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

apache重写有关问题

WBOY
Release: 2016-06-13 13:08:55
Original
791 people have browsed it

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

Copy after login

注释那行可以访问但是会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

这句是不是有问题啊!
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template