## 隱藏入口文件
Apache配置:
1. `httpd.conf`配置文件中加載了`mod_rewrite.so`模塊
2. `AllowOverride None`將`None`改為`All`
3. 把下面的內容保存為`.htaccess`文件放到應用入口文件的同級目錄下
```
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
```
Nginx 偽靜態配置:
```
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}
```