This is a discussion on Stripping single name/value pair from QUERY_STRING within the Linux Web Servers forums, part of the Web Server and Related Forums category; I want to strip a single name/value pair from a QUERY_STRING when Googlebot visits, and redirect it to exactly ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I want to strip a single name/value pair from a QUERY_STRING when
Googlebot visits, and redirect it to exactly the same URL...only without that name/value pair at the end. Is this possible using mod rewrite alone, or will I have to do it at PHP level instead? *** To elaborate a little more, Googlebot has picked up a PHPSESSID for hundreds of pages. Or rather, it's picked up multiple PHPSESSIDs for each of these pages, which is not only a ridiculous bandwidth hog but is affecting search ranking too (it sees them as duplicate pages). I've since modified the PHP session code to prevent Googlebot picking up PHPSESSIDs when it visits, but unfortunately it's already got hundreds of URLs stored with PHPSESSID name/values in its database, so it won't drop them because they always resolve. So I need to do what I said in the first paragraph. Strip it out and do a permanent redirect, bearing in mind the number of other name/value pairs in the QUERY_STRING is unpredictable and must remain untouched. TIA -- John |