RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /index.php?route=$1
有了重写规则,如果我输入任何不以反斜杠结尾的链接,GET字符串将被附加在末尾。示例如下:localhost/forum/显示为localhost/forum/localhost/forum显示为localhost/forum/?route=论坛
GET
nbnkbykc1#
添加一行RewriteCond %{REQUEST_FILENAME} !-d因此,当指向现有目录时,
RewriteCond %{REQUEST_FILENAME} !-d
1条答案
按热度按时间nbnkbykc1#
添加一行
RewriteCond %{REQUEST_FILENAME} !-d
因此,当指向现有目录时,