O
O
Optimus2018-12-25 19:15:03
htaccess
Optimus, 2018-12-25 19:15:03

How to fix error in htaccess?

Now in htaccess:

RewriteEngine On
RewriteRule ^$ index.php [QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

Problem:
Sometimes, for unknown reasons, the page:
domain.com/catalog/test
Redirects to
domain.com/ index.php /catalog/test
I have no idea how to win?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2018-12-25
@alekstar79

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question