`
cuiyadll
  • 浏览: 197216 次
文章分类
社区版块
存档分类
最新评论

系统的伪静态规则

阅读更多

由于Dream系统的内核是Thinkphp3.1,只需将index.php给隐藏就行了,让地址更加美观简洁。

满足伪静态(url重写)条件:
1、 服务器开启url_rewrite功能,linux空间的php虚拟主机只需要开启apache的mod_rewriet,如果是iis6.0就要安装ISAPI Rewrite模块,apache只要开启Mod_rewrite功能就可以了。
2、 Linux空间编辑.htaccess文件,windows空间编辑httpd.ini文件。
3、 到“\Sys\ThinkPHP\Conf\convention.php”配置文件里,修改URL_MODE的值为2,即可开启伪静态模式。


废话不多说,直接上代码

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

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics