Mellow Morning » Setting up .htaccess for Wordpress: "Setting up .htaccess for Wordpress
By Thierry Schellenbach on 05 Sep 2007
Usually .htaccess for Wordpress is set automatically when you change the permalink settings.
Unfortunately for me the Wordpress system was not working properly. When I wrote the first posts on this blog however I did not bother to deal with the issue. Doing so leaves you with two problems:
1. How to set .htaccess
2. How to ensure the links to your old posts get redirected
After reading the great mod_rewrite documentation and combining that with a great .htaccess files here my solution.
In order to deal with the old posts:
RewriteCond %{QUERY_STRING} ^p=11$
RewriteRule ^$ http://www.mellowmorning.com/2007/08/27/picture-resizing-on-steroids/? [R=301,L]
RewriteCond %{QUERY_STRING} ^p=3$
RewriteRule ^$ http://www.mellowmorning.com/2007/08/18/ten-reasons-why-symfony-rocks-part-1/? [R=301,L]
RewriteCond %{QUERY_STRING} ^p=4$
RewriteRule ^$ http://www.mellowmorning.com/2007/08/12/barcamp-events/? [R=301,L]
RewriteCond %{QUERY_STRING} ^feed=atom&cat=1$
RewriteRule ^$ http://www.mellowmorning.com/category/symfony/feed/? [R=301,L]
Note that HTTP_HOST and QUERY_STRING are by not included in the conditions checked by RewriteRule. The rewrite rule only ge"
No comments:
Post a Comment