Why does this wordpress site redirect wrongly in Chrome?

Google has indexed this page http://[site-removed]/showering-accessories on my client’s site which doesn’t actually exist. The correct URL should be http://[site-removed]/products-page/showering-accessories

I don’t want the site to be penalised in Google, So I’ve added this rule in .htaccess in the root of the site:

Read More
RedirectMatch 302 ^/showering-accessories /products-page/showering-accessories

(Note: I had been experimenting with 301 redirects previously)

This works as intended in IE and Firefox, but in Chrome I end up at this page, due to what I assume is a wordpress application-level (PHP) redirect:

http://[site-removed]/products-page/products

Why is this? Shouldn’t the .htaccess rules always kick in before it reaches the PHP code?
How can I fix it?

BTW I also have these rules below the RedirectMatch:

# Redirect all pages to subdirectory /new
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} /
RewriteRule ^(.*)$ /new/$1 [L,QSA]

Related posts

Leave a Reply

1 comment