当前位置:Gxlcms > 数据库问题 > ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php

ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php

时间:2021-07-01 10:21:17 帮助过:25人阅读

%{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>

重启Apache之后,原来的 http://serverName/index.php/Blog/read/id/1 就可以通过访问 http://serverName/Blog/read/id/1 简化了URL地址。

ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.php

标签:index   iter   mode   div   rri   去掉   one   cond   方式   

人气教程排行