Forum Moderators: phranque
The .htaccess file looks like this:
RewriteEngine on
RewriteRule ^([^"]+)/?SessionID=([^"]+)$ php/admin.php?system=$1&SessionID=$2 [L,NC]
And it`s not working(error 404 not found).
If i remove the "?" before SessionID everything is fine and works perfect. I tried to escape the "?" with various regular expressions, but nothing seems to work. Any ideas?
Further, you can use [QSA] to append additional query parameters while keeping the original ones, making it unnecessary to 'manually copy' anything from the original query string, unless -as in this case- you want to do case-conversion or otherwise change the parameter name.
RewriteCond %{QUERY_STRING} ^SessionID=([^"]+)$ [NC]
RewriteRule ^([^"]+)/$ php/admin.php?system=$1&SessionID=%1 [L]
The resources cited in our Forum Charter, particularly the mod_rewrite documentation, might prove useful.
Jim