开发者

RewriteRule issue

开发者 https://www.devze.com 2023-02-03 13:57 出处:网络
I have a rule for redirecting users to a folder: RewriteRule ^f-(.*)$ download/$1 but this folder now contains many files on it, so how can i make a new rule to redirect to a new folder?

I have a rule for redirecting users to a folder:

RewriteRule ^f-(.*)$ download/$1

but this folder now contains many files on it, so how can i make a new rule to redirect to a new folder?

RewriteRule ^f-(.*)$ download2/$1

whilst the old one should still work开发者_StackOverflow中文版 with the same rule.

regards, Al3in


you have [L] in first rule? if you have you must remove it. (if i understand your problem correctly!)


You can just use a RewriteCond and the "-f" test to see which download?/ directory the file really exists in.

http://httpd.apache.org/docs/current/rewrite/rewrite_guide.html#multipledirs

0

精彩评论

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