baidut / markit

a bookmark-sharing website
http://markit.sinaapp.com/
MIT License
1 stars 2 forks source link

隐藏index.php #6

Closed baidut closed 9 years ago

baidut commented 9 years ago
  1. 配置appache服务器开启rewrite功能(修改httpd.conf文件,重启appache) XAMPP默认打开,不用再配置
  2. 在网站根目录(index.php)创建.htacess文件,写入以下内容
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /相对路径/index.php?/$1 [L]