Answer the question
In order to leave comments, you need to log in
How to remove a folder from urlrewrite.php processing?
Good afternoon,
All requests to the Bitrix site are processed by the /bitrix/urlrewrite.php file. There is a folder /docs/ which contains independent scripts. Everything in it is built according to the MVC principle and all requests must go to index.php inside the folder. How can I specify urlrewrite so that everything that goes into this folder is directly, and not processed?
In .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
Answer the question
In order to leave comments, you need to log in
Add .htaccess RewriteRule ^/docs/(.*) /docs/index.php [L]
And if there is some static in /docs/ and requests to it reach Apache, then you need to insert RewriteRule again before this these three RewriteConds.
Add or remove an exception to address processing: www.your_site.ru/bitrix/admin/urlrewrite_list.php?lang=ru
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question