0
我有设在这里两个网站资源...阿帕奇重写第三目录深度为第一目录深度
localhost/index.php /* rewrite handler */
localhost/images/
localhost/scripts/
然后,我有两个网站...
localhost/site1/
localhost/site2/
我想重写...
localhost/site1/images/
localhost/site2/images/
localhost/site1/scripts/
localhost/site2/scripts/
...到...
localhost/images/site1/
localhost/images/site2/
localhost/scripts/site1/
localhost/scripts/site2/
有没有办法让“site1”和“site2”成为一个动态变量(这样我就不必手动添加一个例外或规则,如果我将来会增加更多的网站)方式?
这条规则重写目录,我希望能够和访问文件,而不仅仅是指数...
RewriteRule .*\/scripts\/$ scripts\/$1 [L]