[tp3.2.1]开启URL(重写模式),省略URL中的index.php

重写模式(省略url中的index.php)

在apache配置文件httpd.conf中,查找

            1.mod_rewrite.so, 启动此模块

            2.AllowOverride , 值= All

            3. 把下面的内容保存为.htaccess文件放到应用入口文件的同级目录下

1 <IfModule mod_rewrite.c>
2     Options +FollowSymlinks
3     RewriteEngine on
4 
5     RewriteCond %{REQUEST_FILENAME} !-d
6     RewriteCond %{REQUEST_FILENAME} !-f
7     RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8 
9 </IfModule>

 

posted @ 2015-01-13 21:01  怒杀神  阅读(7093)  评论(0编辑  收藏  举报