robert_gsfame Posted August 3, 2009 Share Posted August 3, 2009 PHP master, i always see on everyone page url typed like this index/login/members i really wonder how they do this that..they don't have *.php and they have slash "/ " is the slash because of the folder where they put file "members" ?? Please explain this to me... THX in advance Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/ Share on other sites More sharing options...
RichardRotterdam Posted August 3, 2009 Share Posted August 3, 2009 You might want to look into mod_rewrite Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-889507 Share on other sites More sharing options...
dreamwest Posted August 3, 2009 Share Posted August 3, 2009 RewriteRule ^index/login/members index.php?section=members&action=login [L,QSA] Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-889517 Share on other sites More sharing options...
Andy-H Posted August 3, 2009 Share Posted August 3, 2009 RewriteRule ^index/(.*)/(.*) index.php?section=$1&action=$2 [NC] Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-889528 Share on other sites More sharing options...
dreamwest Posted August 3, 2009 Share Posted August 3, 2009 Really!? What about this... RewriteRule ^([^/\.]+)/(.*)/(.*) index.php?section=$2&action=$3&root=$1 [L,QSA] I win Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-889536 Share on other sites More sharing options...
Andy-H Posted August 3, 2009 Share Posted August 3, 2009 I guess you do lol Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-889539 Share on other sites More sharing options...
robert_gsfame Posted August 3, 2009 Author Share Posted August 3, 2009 can anyone tell me in detail those steps....Sorry, cause i am not familiar n still new for this thing.. Please help me... Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-889764 Share on other sites More sharing options...
RichardRotterdam Posted August 4, 2009 Share Posted August 4, 2009 To give you a valid answer which I prob should have done before. What webserver are you using? If you are running apache have you looked up mod_rewrite? I'ts pointless to dive into these rewrite rules when you're not able to have mod_rewrite. Maybe you're running IIS and you want to run ISAPI Rewrite Quote Link to comment https://forums.phpfreaks.com/topic/168621-create-user-friendly-url/#findComment-890408 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.