![]() |
mod_rewrite
Well I've worked with it before but this time it's just not cooperating. I need to turn this..
http://domain.com/index.php/member/foo/this into http://domain.com/index/member/foo/this I got the impression it would be something like this Options +FollowSymLinks RewriteEngine On RewriteRule ^(.*)$ $1/ |
I may be wrong about this, but shouldn't it be the other way around?
RewriteEngine On RewriteRule ^/([A-Za-z]+)/ /$1.php |
You'll probably want something more along the lines of:
Code:
<IfModule mod_rewrite.c>RewriteCond lines make sure that the rewriting only happens if the URL is not otherwise normally accessible (useful for images, CSS, etc.). The RewriteRule line rewrites URIs starting with index/ as you requested. |
Well, do there really have to show that index?
ie. Code:
http://domain.com/member/foo/thisCode:
http://domain.com/index.php?mode=member&cat=foo&do=thisCode:
RewriteEngine OnIn the end you find those tags, if I recall correct QSA allows more definitions in url end (domain.com/member/foo/this/?newdef=likethis) and L says that rule ends there. If you like, you can do all your files look like "folders".. Well I put some examples bellow: Code:
http://domain.com/customers.php => http://domain.com/customers/Code:
http://domain.com/folder/mypanel.php => http://domain.com/folder/mypanel/Code:
RewriteCond %{REQUEST_FILENAME} !-fHope these help you and please don't kill me if won't work as it is presented in your system. Those should because I use them ATM! ;) |
I never really got mod_rewrite, do those codes work for every variable, or do you need to change it depending on the get variables you want to pass?
|
| All times are GMT. The time now is 07:28 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0