Home  >  Article  >  Backend Development  >  关于apache服务器rewrite,该如何解决

关于apache服务器rewrite,该如何解决

WBOY
WBOYOriginal
2016-06-13 12:15:35792browse

关于apache服务器rewrite
我的目的是在地址栏输入的url:
http://localhost/project/ShortURL/index.php/149Ui3
自动重写为
http://localhost/project/ShortURL/index.php?controller=jump&method=jemp&code=149Ui3
apache中添加配置如下(apache2.conf):

<br /><IfModule mod_rewrite.c><br />     # Turn on rewrite engine<br />     Options +FollowSymlinks<br />     RewriteEngine on<br />     # More rules below<br />     RewriteRule ^index.php/(.*)$ index.php?controller=jump&method=jump&code=$1 [QSA]<br /></IfModule><br />

但是始终不能跳转,请问应该如何正确配置呢.
------解决思路----------------------
1.httpd.conf中rewrite模块是否正确开启
2.你写入的这个配置文件是否有效

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:数组算法Next article:怎么做到高内聚,低耦合