好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

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

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

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

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

标签:

查看更多关于ThinkPHP 利用.htaccess文件的 Rewrite 规则隐藏URL中的 index.ph的详细内容...

  阅读:24次