Forum Moderators: phranque

Message Too Old, No Replies

Rewriting URLs

Session IDs

         

EarleyGirl

3:43 pm on Feb 14, 2006 (gmt 0)

10+ Year Member



I have a site that used a PHP script and when spidered by major SEs retained tons of my-itemnumber.html?PHPSESSID=long#sletters in their cache. I'm no longer using this PHP script but my page names are the same (but of course, no session ids). The pages should be my-itemnumber.html not the above. I have many of these so rewriting each URL is not feasable. Is there a script or a way I can (in .htaccess) do an "if when" my-*.html?PHPSESSID=* is found that it is redirected to the my-*.html without the session id attached using wildcards? So that automatically when any visitor is coming in with a session ID attached to a link it will be redirected to the page with a clean, correct URL?

I'd appreciate any suggestions.

Hope

jdMorgan

3:59 pm on Feb 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hope,

Here's a thread to get you started. The solution to your problem is actually slightly simpler:
[webmasterworld.com...]

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

EarleyGirl

9:13 pm on Feb 14, 2006 (gmt 0)

10+ Year Member



Hi Jim,

Just as you said, it was simpler than I thought. Thanks so much for the helpful links.

Hope