求apche重定向规则
rewriterule ^(?!admin|user|inde\.php|config\.php|%{http_host}) %{http_host} [r=301.l]
求除了首页及admin目录和user目录以及index.php和config.php 都转跳到首页...
------解决方案--------------------
rewriteengine on
rewritebase /
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
这样能行吗?
------解决方案--------------------
重定向都用于不同域名间的转向,实际由浏览器完成
你重定向到自己,不会死循环吗?
仅仅路径不同,那就直接指派就可以了