Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: kill3r - kesäkuu 29, 2007, 03:46:50 AP

Otsikko: Remove session id from sitemap
Kirjoitti: kill3r - kesäkuu 29, 2007, 03:46:50 AP
i m about to create a sitemap for my forum, many people said search engines ignore crawling over urls with php session ids. so i thought of removing them while creating a sitemap.

found this recommendation.

1. In .htaccess add following lines:

#removing phpSESSid from URL
php_value session.use_only_cookies 1
php_value session.use_trans_sid 0

You will stil use session ids but they will not be vissible in URLs.

2.If you have URLs containing phpSESSid already indexed, add to the .htaccess:

Options +FollowSymlinks
RewriteEngine On

RewriteCond %{QUERY_STRING} ^phpSESSid=.*$
RewriteRule .* %{REQUEST_URI}? [R=301,L]

After appying this two thigs Now I have about 1300 indexed URLs containing phpSESSid.


will the above said code help me to create sitemaps without phpsessionid for smf. plz help.
Otsikko: Re: Remove session id from sitemap
Kirjoitti: kill3r - kesäkuu 29, 2007, 10:13:54 IP
i solved this myself. thanks everyone