30
Here is the Apache mod_rewrite code, the conditions/rules did have some code up the top, to _only_ "strip" the session id
IF the visitor was a spider/bot, however considering XOOPS users, if they have the need to use this code, it would be for all visitors, therefore I have removed the first set of rules.
Add this to your .htaccess file, BUT
PLEASE read the notes below:
# Set some options
Options FollowSymLinks
#
RewriteEngine on
RewriteBase /
#
# case: leading and trailing parameters
RewriteCond %{QUERY_STRING} ^(.+)&PHPSESSID=[0-9a-z]+&(.+)$ [NC]
RewriteRule (.*) $1?%1&%2 [R=301,L]
#
# case: leading-only, trailing-only or no additional parameters
RewriteCond %{QUERY_STRING} ^(.+)&PHPSESSID=[0-9a-z]+$|^PHPSESSID=[0-9a-z]+&?(.*)$ [NC]
RewriteRule (.*) $1?%1 [R=301,L]
NOTES:1.
ONLY use this code if you
need to, please don't just add it to your .htacess file. You only 'need to' use it,
if search engine results for your website, are showing the session id (PHPSESSID or another)in the url/link.
2. This code comes with no guarantess, has not been tested, use at your own risk.
HTH
P
NO to the Microsoft Office format as an ISO standard. Sign the
petition