Staging server .htaccess for images, css and js
Posted
by Gavin Hall
on Stack Overflow
See other posts from Stack Overflow
or by Gavin Hall
Published on 2010-05-31T06:48:56Z
Indexed on
2010/05/31
6:52 UTC
Read the original article
Hit count: 270
As we build and demo sites on our staging server with individual root folders for each such as /CLIENTNAME, we need to keep all the css, js and internal links for these sites referencing the server root.
The following works for one folder each, but not sure how to adapt to work for all folders.
Currently
AddHandler php5-script .php
RewriteEngine On
RewriteRule ^(images|css|js)\/(.*) /ONEFOLDER/$1/$2
Would like
AddHandler php5-script .php
RewriteEngine On
RewriteRule ^(images|css|js)\/(.*) /EVERYFOLDER/$1/$2
Many thanks in advance.
© Stack Overflow or respective owner