Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.htaccess 代码是
RewriteEngine off <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^$ public/ [L] RewriteRule ^(.*) public/$1 [L] </IfModule>
问题是什么?
我不太确定这是否是你想要做的,但试试这个:
RewriteEngine Off <IfModule mod_rewrite.c> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteEngine On RewriteBase / RewriteRule ^(.*)$ public/$1 [L,QSA] </IfModule>