Here is my code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond application/public/%{REQUEST_FILENAME} -f
RewriteRule (.*) application/public/$1 [L]
I want to make expression:
- If file
{REQUEST_FILENAME}
doesn't exist AND if fileapplication/public/%{REQUEST_FILENAME}
exists do rewrite
Example results:
- /style.css = /application/public/style.css
- /gfx/logo.png = /application/public/gfx/logo.png
- /index.php = /index.php
- /Welcome = /index.php?input=Welcome (it's working)
What is proper code for this expression? I think i need to change line:
RewriteCond application/public/%{REQUEST_FILENAME} -f
But i have no bloody idea how...
Full .htaccess listing:
RewriteEngine on
RewriteRule style,(.+).css tmp/merged/css,$1 [L,QSA]
RewriteRule script,(.+).js tmp/merged/js,$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond application/public/%{REQUEST_FILENAME} -f
RewriteRule (.*) application/public/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) index.php?input=$1 [L,QSA]
(sorry for my english)