个人用的方法,感觉还不错:
代码如下 |
复制代码 |
Options +FollowSymLinks
RewriteEngine on
RewriteBase /poster
RewriteCond $1 !^(index.php|images|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
|
如果在根目录,那么把/poster改成/就行了,如果在http://xxx.xxx/aaa 则把/poster改成/aaa