0
我想轉換一個簡單的.htaccess文件(規則)用於nginx。我嘗試在googleit之後訪問一個在線工具,但該網站已關閉。所以,如果有人願意幫忙,我會很感激。謝謝。這裏是我的.htaccess文件:.htaccess到nginx重寫規則
選項+ +了FollowSymLinks ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# we skip all files with .something
RewriteCond %{REQUEST_URI} \..+$
RewriteCond %{REQUEST_URI} !\.html$
RewriteRule .* - [L]
# 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]
</IfModule>