开发者

Staging server .htaccess for images, css and js

As we build and demo sites on our staging server with individual root folders for each s开发者_开发技巧uch 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.


I don't think that's possible unless you can detect, based on the URL, what client it is (it would have to be in the name), and that is what you're trying to avoid.

.htaccess is made to manipulate paths, not to create seemingly "random" new ones.

I think your single path thing will work the best.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜