Warning: Expiry date cannot have a year greater then 9999 in /home/kilandor/seditioforge.com/system/common.php on line 244
This tutorial will teach you how to get rid of PHPSESSID urls once they have already been indexed by google. Amazing stuff. - Removing PHPSESSID from URLs - Seditio Forge
This tutorial will teach you how to get rid of PHPSESSID urls once they have already been indexed by google. Amazing stuff.
Author: Lombi
Submitted by: Lombi
Date: 2007-08-31 15:30
Comments: (0)
Ratings:
 
This tutorial will teach you how to get rid of PHPSESSID urls once they have already been indexed by google. Amazing stuff.

Open up system/header.php and put the following code right at the beginning. Works wonders.

Code:
$URL = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if (!ini_get ('safe_mode') && preg_match ('/'.session_name().'=([^=&\s]*)/i', $URL))
{ $URL = preg_replace ( array ('`'.session_name().'=([^=&\s]*)`', '`(&|\?)+$`'), '', $URL);
@ header ("HTTP/1.1 301 Moved Permanently");
@ header ("Location: " . trim ($URL));
exit();
}
Copyright © 2008 Domain.Com. All Rights Reserved.
Page created in 0.114 seconds