.htaccess mod_重写帮助
不知什么原因,我的重写规则没有启动。你能提出建议吗.htaccess mod_重写帮助,.htaccess,mod-rewrite,friendly-url,.htaccess,Mod Rewrite,Friendly Url,不知什么原因,我的重写规则没有启动。你能提出建议吗 /extranet/.htaccess(1) /extranet/stable/ /extranet/dev/ /extranet/dev/.htaccess(2) htaccess将所有通信重定向到稳定文件夹,但专门指向dev文件夹的URL除外。那很好 在dev文件夹中,第二个.htaccess应该将/extranet/dev/foo/重写为/extranet/dev/index.php?app=foo 这让我失望 IndexIgnore
(1)/extranet/.htaccess
/extranet/stable/
/extranet/dev/
(2)/extranet/dev/.htaccess
/extranet/dev/foo/
重写为/extranet/dev/index.php?app=foo
这让我失望
IndexIgnore *
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
#--------------------------------------------
# FRIENDLY URLs
#--------------------------------------------
# if the following conditions are met, SKIP the rewriteRules.
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC,OR]
RewriteCond %{REQUEST_URI} ^/(|_css/|_js/|_img/) [NC]
RewriteRule . - [L]
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?app=$1 [NC,QSA,L]
^/(|u css/|u js/|u img/)
的第一个备选选项是^/
,根据请求URI测试的选项总是正确的。即使我删除了整个rewriteCond,只留下最后一个rewriteRule指令,重写也不会启动。