Answer the question
In order to leave comments, you need to log in
How to disallow non-existent paths in .htaccess?
Hey!
There is a file at the following address: site.ru/link.php
The CNC is configured for it: site.ru/link/
I noticed that a lot of duplicate pages flew into the Yandex index, such as: site.ru/link.php/whatever/ here/
Tell me how to disable such things in .htaccess?
Thank you!
Answer the question
In order to leave comments, you need to log in
anything in regular expressions -
I don’t remember the % symbol exactly in the syntax, but if the redirect should be like
site.ru/%.php%
to site.ru/%.php
I myself am lame on regular expressions, but I need to dig into this side.
Try editing it and testing the redirect until you get the desired result. htaccess is updated immediately and Apache reboot is not required. And check here.
https://en.wikipedia.org/wiki/%D0%A0%D0%B5%D0%B3%D...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question