Memo: if you use multiple rewrite rules in your .htaccess file, remember that each RewriteRule must follow the necessary RewriteCond, e.g. you can not pack all rules. Thus, this doesn’t work:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?jid=$1&mode=$2 [L,QSA]
RewriteRule ^(.*)$ index.php?jid=$1 [L,QSA]
while this works smoothly.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ index.php?jid=$1&mode=$2 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?jid=$1 [L,QSA]
Of course I stumbled upon this while hacking at my jabber presence agent.
Lascia un commento