Hello, I'm trying to use htaccess to redirect a project, but I have encountered a problem with accessing my Public folder, where my assets are.
Below is my .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond Public/$1 -F
RewriteRule (.+) Public/$1 [L]
RewriteCond $0 !^(index\.php|Public/)
RewriteRule ^(.*)$ index.php?key=$1 [QSA]
</IfModule>
The problem that happens is as follows:
When I call my masterpage <script src="Public/css/styles.css">
it throws the value Public/css/styles.css
to index.php?key=$1
...
I needed to access the Public / css folder and make the normal css / js call.