AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] apache-2.4.9 配置Rewrite规则错误 |
|
---|---|
63menhu |
63menhu 发表于 2015-05-02 12:48:00
本帖最后由 63menhu 于 2015-5-2 13:19 编辑
apache规则错误,请指教怎么改 <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /mobile RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^mobile\/(.*)$ mobile/index.php?$1 [QSA,L] RewriteBase /admin RewriteRule ^admin\/(.*)$ admin/$1 [QSA,L] RewriteBase /attachs RewriteRule ^attachs\/(.*)$ attachs/$1 [QSA,L] RewriteBase /themes RewriteRule ^themes\/.*\.(html|xml) [F,L] RewriteRule ^themes\/(.*)$ themes/$1 [QSA,L] RewriteBase /static RewriteRule ^static\/(.*)$ static/$1 [QSA,L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php$2 [QSA,L] </IfModule> <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule>
点赞,加油! (0分)
2015-05-02 12:48:00 1
|
iCharlesC |
前面两组 <IfModule mod_rewrite.c> 重复了吧。
试试 <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /mobile RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^mobile\/(.*)$ mobile/index.php?$1 [QSA,L] RewriteBase /admin RewriteRule ^admin\/(.*)$ admin/$1 [QSA,L] RewriteBase /attachs RewriteRule ^attachs\/(.*)$ attachs/$1 [QSA,L] RewriteBase /themes RewriteRule ^themes\/.*\.(html|xml) [F,L] RewriteRule ^themes\/(.*)$ themes/$1 [QSA,L] RewriteBase /static RewriteRule ^static\/(.*)$ static/$1 [QSA,L] RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php$2 [QSA,L] </IfModule> <IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule>
回复
2015-05-02 22:22:36 2
|