ubuntu(14.04) 下配置重写

1.开启rewrite模块,使用命令:a2enmod  rewrite

2.在apache2.conf,配置你网站的目录(是目录而定)

3.在你的网站目录下添加去掉index.php的.htaccess(分布式配置文件)

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

4.重启apache.  service apache2 restart .即可实现

 

posted @ 2016-03-08 12:44  天道酬勤,坚持!  阅读(285)  评论(0编辑  收藏  举报