Answer the question
In order to leave comments, you need to log in
How to make a redirect only for the second level of nesting?
I can’t understand how you can get such a redirect so that when you go to https://site.com/first/second/ there is a redirect to https://site.com/first/target/, but at the same time what would happen when you go to https://site.com/first/second/ there was no redirect to https://site.com/first/second/third/ .
I thought something like this would work, but it didn't.
RewriteRule ^/first/second/$ https://site.com/first/target/ [R=301,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question