A
A
Adik Izat2020-10-27 17:48:18
htaccess
Adik Izat, 2020-10-27 17:48:18

How to exclude one directory from the {REQUEST_FILENAME} !-d condition via .htaccess?

Hello!

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} ^(catalog)/$
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

I use opencart, there is a /catalog/ directory at the root of the site, and I also created a category with the url /catalog/.
I need to redirect to index.php when I go to /catalog/, how can I do this correctly? Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-10-27
@JaxAdam

RewriteCond %{REQUEST_URI} ^(|/)catalog/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question