Forum Moderators: phranque
I am able to use basic rewrites such as:
RewriteRule ^products/([0-9]+)/$ /products.php?id=$1
which predicitably does the following:
[mysite.com...] to [mysite.com...]
No probem there at all when it can be passed as a cookie. The problem is when I use phpsessions and a user has cookies disabled. The PHPSESSID is dropped completely as well as any other GET arguments. So the following happens:
[mysite.com...] still goes to [mysite.com...]
without the PHPSESSID or test variables. The variables are in the url but they aren't read by products.php.
I'm guessing the solution relies on RewriteCond but I can't figure out the correct syntax. Any help or link appreciated.
Welcome to WebmasterWorld!
See the mod_rewrite RewriteRule documentation [httpd.apache.org], specifically the [QSA] and [L] flag definitions.
RewriteRule ^products/([0-9]+)/$ /products.php?id=$1 [QSA,L]