Handling PHPSESSID with a 301 error status

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
evans123
Forum Newbie
Posts: 18
Joined: Wed Nov 17, 2010 4:48 pm

Handling PHPSESSID with a 301 error status

Post by evans123 »

I have landed on a page, lets say http://www.example.com/test?PHPSESSID=123456789, i want to get rid of the PHPSESSID so i remove it from the query string and send a 301 permenant redirect status along with the new url. Then i found out that http://www.example.com/test doesn't exist so i would output a 404.

Is this the correct method or would i be better off leaving the 301 permenant redirect until i know its a 404 and then not both to remove the PHPSESSID?
Post Reply