时间:2021-07-01 10:21:17 帮助过:39人阅读
RewriteEngine onRewriteBase /RewriteCond $1 !^(admin\/(.*)|$)RewriteCond $1 !^(user\/(.*)|$)RewriteCond $1 !^(index.php(.*)|$)RewriteCond $1 !^(config.php(.*)|$)RewriteRule ^(.*)$ index.php [L,QSA]
RewriteRule ^(?!admin(/.*)?|user(/.*)?|config\.php)$ index.php
这样能行吗?
重定向都用于不同域名间的转向,实际由浏览器完成
你重定向到自己,不会死循环吗?
仅仅路径不同,那就直接指派就可以了
RewriteEngine onRewriteBase /RewriteCond $1 !^(admin\/(.*)|$)RewriteCond $1 !^(user\/(.*)|$)RewriteCond $1 !^(index.php(.*)|$)RewriteCond $1 !^(config.php(.*)|$)RewriteRule ^(.*)$ index.php [L,QSA]