Hi everybody,
In my web site I have several index pages in different languages in the following format
http://www.mysite.com/lang_index.html
Two days ago I noticed increased, many times. Google bot activity on my site and when I checked my log file I found that all pages crawled were wrong web addresses: to the above index were added existing files from my site like
/folder1/folder2/file.html
So, the strings looked like
http://www.mysite.com/lang_index.html/folder1/folder2/file.html
And surprisingly all they returned code "200".
My question is: is there any way to rewrite such requests to the first ".html"
found in the string.
Your help is greatly appreciated.
Scott
November 13, 2013, 5:36am
2
Something like:
RewriteRule (.*\.html).*\.html$ $1 [R=301,L]
1 Like
Neo
November 13, 2013, 6:10am
3
You should find out why a bad URI is returning a 200 status code.
Perhaps you have some rewrite rules already that are effecting this?
1 Like
works great!
thank you very much.
---------- Post updated at 02:16 PM ---------- Previous update was at 02:13 PM ----------
you are right, but I could not find what causes this. Anyway, will leave it with the working solution from Scott.
thank you for your point.
---------- Post updated 11-14-13 at 10:24 AM ---------- Previous update was 11-13-13 at 02:16 PM ----------
Scott, please tell me how this line will look like no matter what characters are after the first ".html"
thank you one more time