Answer the question
In order to leave comments, you need to log in
How to make a redirect from the main page to a specific page using .htaccess?
Previously, I implemented a redirect from the main domain to the site page.
Everything worked, but now it began to write that the redirection is cyclic.
Please tell me what is wrong and why the script stopped working?
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^site.ru
RewriteRule ^(.*)$ http://site.ru/campaign$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^www.site.ru
RewriteRule ^(.*)$ http://site.ru/campaign$1 [R=permanent,L]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTP_HOST} ^site.ru$
RewriteCond %{REQUEST_URI} !^campaign.*/$
RewriteRule ^(.*)$ http://site.ru/campaign$1 [R=permanent,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question