Home  >  Article  >  Backend Development  >  apache rewrite规则 跪求大神

apache rewrite规则 跪求大神

WBOY
WBOYOriginal
2016-06-13 13:35:36935browse

apache rewrite规则 跪求大神救命啊
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^[a-z0-9\-]+\.iecn\.cn$
RewriteRule ^/?$ /%{HTTP_HOST}
RewriteRule ^/([a-z0-9\-]+)\.iecn\.cn/?$ /blog.php?u=$1 [L]

我在.htaccess里面了这个规则,结果可悲的事情发生了: 
最下面设置个性域名,apache解析成了这样:输入
XXX.iecn.cn,都跳转到 blog.php这个页面。
同服务器下另一个discuz网站的伪静态完全正常,泛解析也设置成功。就是这个规则,怎么也想不明白为什么变成了
任意二级域名都跳转到blog.php这个页面,设置反了????
网上查了一大堆资料都没用。。求大神赐教啊。。。。

------解决方案--------------------
你这个规则的含义就是任意二级域域名

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn