On almost all of my domains i rewrite the WWW sub domain to the no-WWW version. This however went wrong on my own site. And i didn’t even notice it. My friend Alex pointed out that he couldn’t post any comment to the site anymore. So what went wrong?
Normally i use the following lines to do the rewrite.
My own site however still runs Wordpress and this package comes with it’s own set of rewrite rules. And i just dropped my new lines under the Wordpress rewrite rules.
The result was that the WWW sub domain got rewritten to the no-www version. But everything after the trailing slash got dismissed. So rewrites for blog posts didn’t work. And all request would land on the main index. So i did some testing and combined the two sets of rewrite rules. This seems to function properly :)
Next time i just need to check my changes more thoroughly. And thank you Alex for point that out to me.