个人用的方法,感觉还不错:
代码如下 | 复制代码 |
<IfModule mod_rewrite.c> 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] </IfModule> |
如果在根目录,那么把/poster改成/就行了,如果在http://xxx.xxx/aaa 则把/poster改成/aaa
时间: 2024-09-17 04:16:25