//REWRITE模式(重写模式)
httpd.conf 配置文件中加载了 mod_rewrite.so 模块
AllowOverride None 将 None 改为 All
把下面的内容保存为.htaccess 文件放到应用入口文件的同级目录下
这样,ThinkPHP 自带的.htaccess 文件就起作用了,可以过滤掉 index.php 这个字
符串。
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
//去除了index.php
http://localhost/demo39/Home/User/test/user/Lee/pass/123
httpd.conf 配置文件中加载了 mod_rewrite.so 模块
AllowOverride None 将 None 改为 All
把下面的内容保存为.htaccess 文件放到应用入口文件的同级目录下
这样,ThinkPHP 自带的.htaccess 文件就起作用了,可以过滤掉 index.php 这个字
符串。
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
//去除了index.php
http://localhost/demo39/Home/User/test/user/Lee/pass/123