A
A
Anton2018-08-31 13:31:59
htaccess
Anton, 2018-08-31 13:31:59

How to redirect catalog pages to the root of the catalog itself?

How to make a RewriteRule 301 so that
all php pages of a directory, including php pages, are directed to the directory root itself?
It was like this: site.ru/old/service/copy/la_la.php and so site.ru/old/service/
It became like this site/old/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2018-08-31
@anton99zel

RewriteRule ^old/.+$ /old/ [R=301,L]
Set above the rest of the rules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question