M
M
MrSusua2016-07-11 16:27:34
Apache HTTP Server
MrSusua, 2016-07-11 16:27:34

How to make a redirect from the pages to the main page of the site?

Good afternoon!
There are old addresses like:
site.com/blah
site.com/blah-blah
site.com/blah-blah-blah
How do I redirect them to the main page of site.com through .htaccess?
But there is one condition , addresses that contain subfolder data:
site.com/folder-one/...
site.com/folder-two/...
site.com/folder-three/...
do not participate in the redirect should.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2016-07-11
@IceJOKER

RewriteRule ^folder-(one|two|three) - [L]
RewriteRule .*? / [R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question