Need help converting htaccess to ISAPI_Rewrite
-
07-06-2021 - |
Question
Does anyone can help me converting these rules to [ISAPI_Rewrite]. Thanks.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC,OR]
RewriteCond %{REQUEST_FILENAME} -l [NC]
RewriteRule .* - [L]
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
La solution
Unfortunately directive RewriteCond %{REQUEST_FILENAME} -f is a new feature from version 3 that is not supported by version 2. The only workaround - to list all real folders like (?: folder1|folder2|folder3|etc).
1) Don't forget to put the following on top of the config file:
[ISAPI_Rewrite]
2) The second rule should work fine. Maybe you'll need to do:
RewriteRule ^/(.+)$ index.php?url=$1 [I,L]
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow