I
I
Igor2018-09-05 13:49:18
htaccess
Igor, 2018-09-05 13:49:18

ModRewrite - how not to process certain folders for CNC?

RewriteEngine On

RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php?l=$1 [L]

I process all requests coming to the index and display the desired page by URL.
If the script is in a folder, for example, in a folder, /l/
then everything seems to be good, but if I put it in the root directory, then I completely lose control over other folders that I need / admin panel / other modules etc

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
NMNH, 2018-09-05
@m0pfin

RewriteCond %{REQUEST_FILENAME} !/directoryname/.*
Before main processing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question