apache重写问题
本帖最后由 轻翼逐月 于 2012-8-7 16:07 编辑ci中建立了一个app,为news,指定域名为 news.new_ci.com , 要在这个目录下实行重写,在news/.htaccess中
RewriteCond %{HTTP_HOST} ^news\.new_ci\.com
#RewriteRule read-(\d+)\.html http://news.new_ci.com/index.php/read/index/$1
RewriteRule read-(\d+)\.html index.php/read/index/$1
注释的那行可以访问,但是会301,下面那种写法不行,要实现输入 news.new_ci.com/read-1573.html 实际访问的为news.new_ci.com/index.php/read/index/1573应该怎么写规则?
RewriteRule ^index.php/read-(\d+).html$index.php/read/index/$1.html 大道达人 发表于 2012-8-7 15:45 static/image/common/back.gif
RewriteRule ^index.php/read-(\d+).html$index.php/read/index/$1.html
RewriteCond %{HTTP_HOST} ^news\.new_ci\.com
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ /index.php/$1
RewriteRule ^index.php/read-(\d+).html$index.php/read/index/$1
整体这个样子,不行。还是访问不到 :Q顶上去哈 {:soso_e122:} 哎,没人.... {:soso_e147:}没人这样用过么
页:
[1]