Wild card redirect in htaccess giving error this webpage has a redirect loop
Posted
by
kath
on Pro Webmasters
See other posts from Pro Webmasters
or by kath
Published on 2012-09-05T18:39:50Z
Indexed on
2012/09/30
3:50 UTC
Read the original article
Hit count: 354
In my website I changed the directory name "vehicles-cars" to "vehicles-cars-for-sale". When I tried to redirect using a wild card redirect from my old directory name to new directory name in my web hosting cPanel account, I get an error every time I open pages from that directory:
this webpage has a redirect loop
The website is php.
The problem is that that I have lots of pages with the old directory indexed in Google and they are getting duplicate content.
I really need some advice on what to do with this problem.
Here is .htaccess file code for redirect, thanks.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^adsbuz\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.adsbuz\.com$
RewriteRule ^vehicles\-cars\/?(.*)$ "http\:\/\/adsbuz\.com\/vehicles\-cars\-for\-sale\/$1" [R=301,L]
© Pro Webmasters or respective owner