Hi guys,
I'm trying to get a set of 301 redirects working for a client site, and I'm getting a bit stuck.
I have about 17 different directories that have .html content fileswhich I am moving across to Wordpress. What I am trying to do is create a simple, single .htaccess file with redirects in that will allow me to redirect all the .html files within a directory to wordpress URLs without an extension:
Manual redirect example:
redirect 301 /blog/2009/04/post1.html /blog/2009/04/post1/
redirect 301 /blog/2009/04/post2.html /blog/2009/04/post2/
Trying to create a rule like:
RewriteRule ^/blog/2009/04/(.*?).html$ /blog/2009/04/$1/ [R=301,NC,L]
Where the $1 is the filename (minus the .html) suffixed with a /
I can't determine whether the ^/blog/2009/04/(.*?).html$ means it will only redirect for this particular directory, and will redirect to the right location.
I would obviously want to duplicate this ReWriteRule for all my designated content directories...
Can anyone point me in the right direction?
Thanks,
Lee