Answer the question
In order to leave comments, you need to log in
How to set up forwarding?
Good afternoon.
Please tell me how to make a 301 redirect of requests to test1.ru/dir1/
At the same time, leave requests of the format test1.ru/dir1/dir12/ , test1.ru/dir1/* without a redirect
Answer the question
In order to leave comments, you need to log in
You have a global approach. Make a redirect via .htaccess and the redirect must be done by the server itself.
Isn't it easier through the header in the code itself?
php header redirect 301
something like this
if ($_SERVER['REQUEST_URI'] = 'test1.ru/dir1/ ') {
header("Location: / ");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question