Nikita2019-11-09 15:16:19
Nikita, 2019-11-09 15:16:19

301 redirect of the entire directory?

Hello! Can you please tell me how to make a request?
The site had a directory "/forum", there were a large number of pages. We decided to abandon it, but we don’t need 404 pages at all.
Required: for all forum pages (including /forum) to redirect to the main page. on the "/". For example /forum/post.1 redirects to /. Etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
dodo512, 2019-11-09

RewriteRule ^forum($|/) /? [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question