Answer the question
In order to leave comments, you need to log in
How to configure htaccess correctly if RewriteBase is used?
Good evening!
I've got a problem that I can't solve. At the root of the site is htaccess and it redirects to the version without www.
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
RewriteEngine On
RewriteBase /gallery
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
RewriteRule ^.*/?$ index.php [L,QSA]
Answer the question
In order to leave comments, you need to log in
rewrite base should not interfere
well, just put your redirect to www at the beginning of the file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question