Home >Backend Development >PHP Tutorial > apache重写有关问题

apache重写有关问题

WBOY
WBOYOriginal
2016-06-13 13:08:55804browse

apache重写问题

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
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应该怎么写规则?框架是ci

------解决方案--------------------
RewriteRule read-(\d+)\.html /index.php/read/index/$1 试下
------解决方案--------------------
RewriteCond %{HTTP_HOST} ^news\.new_ci\.com

这句是不是有问题啊!
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
Previous article: php遍历memcache全部键值 Next article: PHP表单及印证