Help with a simple rewrite
5 posts
• Page 1 of 1
- universal4
- Posts: 11
- Joined: 17 Aug 2015, 21:04
Help with a simple rewrite
Based upon really poor coding (unless these sites are doing it on purpose) I have found a number of sites have scraped Alexa and republished websites in countries such as New Zealand, Russia and others.
The problem is that they add a key to the domain, and then provide Google index a bad url causing a 404.
I refer to get rid of 404's as I see them and Helicon Isapi has always made this easy, however for some reason I am having trouble rewriting these particular urls.
An example is as follows, and sending it to / root is fine. I have full confidence that the great support here will provide the example I need.
http://domain.com/key/ASWD12345CSA
Thank you in advance, and I will state I love this product and always recommend it to others.
The problem is that they add a key to the domain, and then provide Google index a bad url causing a 404.
I refer to get rid of 404's as I see them and Helicon Isapi has always made this easy, however for some reason I am having trouble rewriting these particular urls.
An example is as follows, and sending it to / root is fine. I have full confidence that the great support here will provide the example I need.
http://domain.com/key/ASWD12345CSA
Thank you in advance, and I will state I love this product and always recommend it to others.
Re: Help with a simple rewrite
Hello.
Sorry for late response.
According to what I see you need to filter everything that comes to your site and starts with '/key/' in the URL and redirect it to '/' (root page)? I suppose you don't have real URLs that starts with 'key'. Please use this rule:
RewriteRule $key/ / [NC,R=301]
Sorry for late response.
According to what I see you need to filter everything that comes to your site and starts with '/key/' in the URL and redirect it to '/' (root page)? I suppose you don't have real URLs that starts with 'key'. Please use this rule:
RewriteRule $key/ / [NC,R=301]
- universal4
- Posts: 11
- Joined: 17 Aug 2015, 21:04
Re: Help with a simple rewrite
I gave that a try and that did not work.
So far I have tried
RewriteRule $key/ / [NC,R=301]
RewriteRule ^$key/ / [NC,R=301]
RewriteRule ^$key/$ / [NC,R=301,L]
No I do not have any folders named /key/ and I see this on a LOT of sites that Google shows as a 404 due to a few alexa scrapers in a few countries mostly in china and New Zealand but some show from a .ru version.
I tested from different browsers each time to make sure it was not a cache thing.
I was hoping to redirect this crap to the home page instead of disavowing the domains.
So far I have tried
RewriteRule $key/ / [NC,R=301]
RewriteRule ^$key/ / [NC,R=301]
RewriteRule ^$key/$ / [NC,R=301,L]
No I do not have any folders named /key/ and I see this on a LOT of sites that Google shows as a 404 due to a few alexa scrapers in a few countries mostly in china and New Zealand but some show from a .ru version.
I tested from different browsers each time to make sure it was not a cache thing.
I was hoping to redirect this crap to the home page instead of disavowing the domains.
Re: Help with a simple rewrite
Sorry, I made a mistake in the rule. Please try this instead:
RewriteRule ^key/ / [NC,R=301]
RewriteRule ^key/ / [NC,R=301]
- universal4
- Posts: 11
- Joined: 17 Aug 2015, 21:04
Re: Help with a simple rewrite
Thank you very much that worked
I swore I had tried that one before I came here and posted the first time but it was not in my comments in the htaccess so I guess not. lol
Always good to have a fresh set of eyes especially when it is the helpful team here.
Thanks again
I swore I had tried that one before I came here and posted the first time but it was not in my comments in the htaccess so I guess not. lol
Always good to have a fresh set of eyes especially when it is the helpful team here.
Thanks again
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 24 guests