Forum Moderators: phranque
RewriteRule ^(.*)PHPSESSID(.*)$ [domain.tld...] [R=301,L]
* starting with any characters
* including PHPSESSID
* ending with any characters
Ok, the only problem i could possible think of is that the first "(.*)" matches the entire string and therefore "PHPSESSID" isn't matched. But I'm quite sure i've been using statements like this before, so please help me in this moment of dispair! What is wrong?
Query strings (anything following "?") are not part of a URL, but rather, data attached to a URL to be passed to the resource at that URL.
Therefore, RewriteRule cannot 'see' the query string, and you must use RewriteCond.
Jim