Mod Rewrite and PHPSESSID issue

Code:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^search\/([^/]+)\/([^/]+)\/([^/]+)\/([^/]+)\.html$ index.php?do=search&m=$1&c=$2&t=$3&v=$4 [QSA,L]
RewriteRule ^([^/]+)\/([^/]+)\/([^/]+)\.html$ index.php?do=$3&plc_id=$2 [QSA,L]
RewriteRule ^([^/]+)\/([^/]+)\/([^/]+)\/([^/]+)\.html$ index.php?do=$4&plc_id=$2&page=$3 [QSA,L]
RewriteRule ^(.*)\.html$ index.php?do=$1 [QSA,L]

i was thinging the [QSA] (query string append) would append the PHPSESSID, but obviously it's not!
 
Last edited:
Have you tried changing the endings to include phpsessid if it exists?

It will leave your links with phpsessid, but you're boogered for that anyway so for example, change this:
Code:
RewriteRule ^(.*)\.html$ index.php?do=$1 [QSA,L]
to:
Code:
RewriteRule ^(.*)\.html\??(PHPSESSID=[a-z0-9]{26})?$ index.php?do=$1&$2 [QSA,L]

and it's the clients fault for having cookies diabled if their url looks ugly :p

Untested btw and the number of char's could be wrong.
 
Back
Top Bottom