1
我有用於Apache這個文件的.htaccess:翻譯的Apache2重寫規則
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
我如何轉換這爲.htaccess的nginx的?
我tryed這一點:
location/{
rewrite ^/$ /index.html;
rewrite//RewriteRule;
rewrite ^/(.*)$ /index.php last;
}
你認爲正確的嗎?
非常感謝!