Answer the question
In order to leave comments, you need to log in
When setting up .htaccess, why did it start redirecting to example.com/?
Good day to all!
When setting up a redirect in .htaccess, it began to redirect to example.com/.
Why?
I wanted to make it so that the user could follow the link both from the https protocol and from www
Removed the bars here
# without www
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]
# without www
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^quest.ra-sn\.ru [NC]
RewriteRule (.*) https://quest.ra-sn.ru/$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
Possibly browser cache, check actual redirects under incognito mode in chrome or here: www.redirect-checker.org
Everything is fine with you, apparently the cache is just
http://quest.ra-sn.ru/
301 Moved Permanently
https://quest.ra-sn.ru/
200 OK
1. who will screen for you?
2. you need
www\.(.+) [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] ]
3.
You have a redirect cache, there are a lot of manovs on the Internet how to disable it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question