Selenium_Wei 发表于 2012-12-2 13:54:32

给ci 项目写 .htaccess 规则 隐藏index.php同时实现统一URL

隐藏 index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|statics|robots\.txt|error\.png)
RewriteRule ^(.*)$ /index.php/$1
强制url 尾部加/

<IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ </IfModule>
自动加上www
RewriteCond %{http_host} ^xx.com
RewriteRule ^(.*)$ http://www.xx.com/$1
怎么把三个统一 起来 我没试成功,请大家帮忙看下!

yeseason 发表于 2012-12-2 15:00:18

伟哥v5

yuvista 发表于 2012-12-3 17:57:55

我对不起你啊。wei哥{:soso_e109:} ,晚上我搞搞。
页: [1]
查看完整版本: 给ci 项目写 .htaccess 规则 隐藏index.php同时实现统一URL