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:
March 09 - 10, 2026
Team Yoast is Speaking at SMX Paris 2026! Click through to see who will be there, what we will do, and more!
See where you can find us next
2 March 2026
Looking to understand SEO? Our "SEO for beginners" webinar covers fundamentals, keyword research, and practical tips to get started.
All Yoast SEO Webinars
Discussion (19)