当前位置:首页 > 服务器技术 > apache

Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php

-s ../mods-avaiable/rewrite.load rewrite.load

 

3、在项目根目录下添加.htaccess文件,修改rewrite规则

<IfModule mod_rewrite.c>
RewriteEngine on

#不显示index.php

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

</IfModule>

 

4、重启服务器

service apache2 restart

 

Ubuntu-server 下Apache2 配置.htaccess 隐藏thinkPHP项目index.php

标签:

本文系统来源:http://www.cnblogs.com/libertycode/p/5935761.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!