【发布时间】:2011-08-04 03:45:09
【问题描述】:
我目前在 htaccess 中有以下重定向,我需要添加两个新的重定向。虽然看起来最后一个通配符重定向覆盖了我试图添加的两个新重定向。我该如何纠正?有什么建议?谢谢。
重写引擎开启
RewriteCond %{HTTP_HOST} ^mydomain.com
重写规则 (.*) http://www.mydomain.com/$1 [R=301,L]
重写规则 ^.*.(jpe?g|gif|png|bmp|ico|swf|gz|xml|htm?l|pem|txt)$ - [L]
RewriteCond %{SCRIPT_FILENAME} !^apanel/*
RewriteRule ^(.*) process.php [L]
我尝试添加的新重定向如下:
RewriteRule ^cs/(.*.css) /shared.php?type=css&files=$1
RewriteRule ^jscript/(.*.js) /shared.php?type=js&files=$1
【问题讨论】:
标签: regex .htaccess redirect rewrite rule