Answer the question
In order to leave comments, you need to log in
How to compose .htaccess correctly?
I need to redirect all requests to index.php, except for those that start with /static, they should be silently (without changing the URL) redirected to /src/App/public/static/.
There is this code:
RewriteEngine on
RewriteRule ^/static/(.*)$ /src/App/public/static/$1 [L,NC]
RewriteRule ^((?!index\.php).+)$ /index.php [L]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_FILENAME} !-f
#если это не файл
RewriteCond %{REQUEST_FILENAME} !-l
# и если это не линка
RewriteCond %{REQUEST_FILENAME} !-d
# и это не директория
RewriteCond %{REQUEST_FILENAME} !/bitrix/urlrewrite.php$
# и это не нужный нам файл, от цикла
RewriteRule ^(.*)$ /bitrix/urlrewrite.php [L]
# то перенапраить все это лядство на него ;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question