I have index.php that reads full path by $_SERVER[‘REQUEST_URI’]
variable. My task is when user enter: www.domain/resource/777
redirect to index.php
with path /resource/777
and parse $_SERVER[‘REQUEST_URI’]
to do some logic. But I have also real files and folders like:
- css/theme.css
- assets/assets.js
- resource/locale.js
When I try this config:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php [L]
Client could not get all css and etc files. How to write correct rule in Apache to achive this?