Home 410 for specific non-existent subfolders
Reply: 1

410 for specific non-existent subfolders

DarsVaeda Published in 2018-01-09 10:23:15Z

In Google Webmaster Tools I get a lot of "strange" urls that have a 404. I have no idea where they come from. They always have subfolders that never existed and probably never will. Here are some examples:

https://example.com/{...}/plus.google.com/facebook.com/password-reset.hmlt/register.html https://example.com/{...}/plus.google.com/facebook.com/facebook.com/password-reset.hmlt https://example.com/{...}/plus.google.com/facebook.com/password-reset.hmlt/plus.google.com https://example.com/{...}/register.html/facebook.com/password-reset.hmlt/register.html https://example.com/{...}/password-reset.hmlt/register.html/plus.google.com/password-reset.hmlt


It seems its a random mix of these subfolders. How can I produce a 410 for these urls utilising the htaccess file?

Dusan Bajic
Dusan Bajic Reply to 2018-01-10 17:20:19Z

Block if the url contains any of the strings:

RewriteEngine On
RewriteCond %{REQUEST_URI} password-reset|register.html|plus.google.com
RewriteRule ^ - [R=410]

Block if the url contains facebook.com and (plus.google.com or password-reset.hmlt)

RewriteEngine On
RewriteCond %{REQUEST_URI} facebook.com
RewriteCond %{REQUEST_URI} plus.google.com [OR]
RewriteCond %{REQUEST_URI} password-reset.html
RewriteRule ^ - [R=410]

([OR] has higher precedence than the (implicit) [AND])

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.313753 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO