In the last days the bingbot is trying to access pages that don’t exist and I didn’t get up to now to identify the origin of these links. Before the original and valid url it is increasing a random dir, example:
GET /ToWLQ/my-valid-url-here-4416.html HTTP/1.1" 404 2608 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
My correct url is:
/my-valid-url-here-4416.html
The string /XuRT/ and the pages are frequently changed.
I would like to redirect through the htaccess to avoid so many mistakes.
from: /ToWLQ/my-valid-url-here-4416.html
to: /my-valid-url-here-4416.html
Thank you
Vera
The best answer here depends on whether you can effectively generalize the pattern that the bingbot prefixes your pages with, as well as the pattern of your pages. Based on the information you provide in the question, a rule like this in your .htaccess will work:
This assumes that the first letter will be uppercase, the second lowercase, and the rest uppercase, followed by a slash then your real page.
EDIT: New rewrite rule based on more information: