
Apache htaccess ルールを nginx 書き換えルールに変換しましたが、機能しません。
Apache .htaccess ルール
RewriteEngine On
RewriteBase /public/layout/themes/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [L]
#RewriteCond %{REQUEST_URI} !^/bootstrap/
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) bootstrap/$1 [L]
Nginx ルール:
location /public/layout/themes/ {
if (!-e $request_filename){
rewrite ^/public/layout/themes/(.*)$ /public/layout/themes/bootstrap/$1 break;
}
}
誰か私がここで何を間違っているのか確認してもらえますか?
答え1
Apacheルールをnginxに変換するにはオンラインツールを使うと思います。これは正しい方法ではないかもしれません。これ参考資料は役に立ちます。