I’m doing some work on a site which has like 4,500 pages indexed with a PHPSESSID in the URL, causing some major duplicate content problems. I got the server admin to disable the PHPSESSID’s by adding the following to the vhost config:
I also wanted Google to get a clean URL when it decided to spider one of the old URL’s again, and didn’t have access to mod_rewrite, so I redirected them with some PHP. The solution is quite simple:
November 27 - 28, 2025
Team Yoast is Attending, Speaking, Sponsoring, Workshop, Yoast Booth at WordCamp Netherlands 2025! Click through to see who will be there, what we will do, and more!
See where you can find us next »
24 November 2025
Expert analysis of the latest SEO & AI news developments with Carolyn Shelby and Alex Moss. Join our upcoming update! 📺
All Yoast SEO Webinars
Discussion (19)