apache2 - Rewrite URLs for static content -


I have a problem with fixed file url, which is in the setup on current .htaccess apache2.

My app structure is:

  / siteroot / siteroot / app / siteroot / lib / siteroot / ... / siteroot / public & lt; - All static files (images, js, etc.) stored here / Siteroot / index.php /siteroot/.htaccess  

Therefore, I like /css/style.css / public / css / Style.css has to rewrite url. I did it in a really easy way, but when the file is not found, it produces 10 internal redirects, which is bad. If no file is found then I need to return the 404 code, or just pass it to the next rule and I have no access to the site configuration file. Only .htaccess

The reason I ask this question is that the site was running on nginx and I need to recreate the same configuration on Apache.

Here's my Htaccess file.

  rewriteignin-on-rewritebase / rewriteconconnect% {REQUEST_FILENAME}! -f RectiteArrill ^. + (.jpg | jpeg | gif | png | ico | css | js | swf) $ / public / $ 0 [L] rewrite cnd% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -D Rewriteul /index.php [L]  

Check that a redirect is appropriate:

Rivet condoms% {REQUEST_FILENAME}! -f rewrite code% {DOCUMENT_ROOT} / public / $ 0 -f recriminate rule ^. (Jpg | jpeg | gif | png | ico | css | js | swf) $ / public / $ 0 [L]

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -