Answer the question
In order to leave comments, you need to log in
How to redirect all pages of different nesting to one, but leave the top one without redirection?
I need to do a .htaccess 301 redirect to get the following results.
All subsequent pages must link to: example.com/v5dl/
, but do not affect the topmost example.com/feed/
Pages intended for redirection have different levels of nesting and, accordingly, in different directories
Examples:
example.com/a/feed/
example.com/x/u/feed/
example.com/x/y/feed/
example.com/r/s/p/feed/
example.com/c/v/n/t/d/feed/
RewriteEngine On
RewriteCond %{REQUEST_URI} /feed/$
RewriteRule ^.*$ https://example.com/v5dl/? [R=301,L]
example.com/feed/
the (upper) one also gets redirected. 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