D
D
dmitryosipov2014-09-25 10:37:47
Apache HTTP Server
dmitryosipov, 2014-09-25 10:37:47

Automatic 301 redirect of directory and all children?

There is a page site.rf/page, from it there is a 301 redirect to site.rf/page/new/

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^сайт.рф/[nc]
RewriteRule ^(.*)$ http://сайт.рф//$1 [r=301,nc]
Redirect 301 страница/
страница/новое

Question: what to do to redirect not only this page, but also all its child elements to a new page. Example: website.rf/page/whattotam, automatically went to website.rf/page/new/whattotam

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
ShamblerR, 2015-03-10
@ShamblerR

Damn man, what do you think?
You have a condition in Cond
Starting from site.rf/
Maybe you will add something similar
starting from site.rf/.*
Rewrite cond is the condition under which the redirect will work.
Also, do not forget to decide on get requests what to do with them, you will have to do another rule with them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question