Hi,
I'm having a lot of trouble getting 301 redirects to work for a site update. It's very odd. I'm hoping someone here might have the answer.
Many of the 301's work just fine. The problem is with old pages that are sub-pages of a parent. For example I might have something like this:
Redirect 301 /cars/ [
mydomain.com...]
Redirect 301 /cars/ford/ [
mydomain.com...]
Redirect 301 /cars/lexus/ [
mydomain.com...]
It fails to redirect. I have tried removing the '/' from the first one as I thought it was treating it as a folder and affecting all the following redirects. That didn't work.
I've spent hours on this and can't seem to find an answer for the correct syntax when sub-pages are involved. The above are all individual pages and I'd like each treating separately and not to affect subsequent 301s.
BTW, this is for a WordPress site - if that makes a difference. The only other thing in the .htaccess other than the many redirects is the following:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Anyone know how to handle sub-pages?