输入banner图图片脚本导航/分类

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

<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

标签: