我爲Magento插件獲得了以下.htaccess代碼,有人可以幫我將它轉換爲有效的Nginx重寫嗎?我正在經歷一段非常艱難的時期。這是一個重寫和緩存Magento URL的插件。將Apache .htaccess轉換爲Nginx
該模塊的原始編輯器不能幫助我。我確定有很多人使用Nginx並想使用這個插件功能!
# static rewrite - home page
RewriteCond %{HTTP_COOKIE} store=default
RewriteCond %{HTTP_COOKIE} !artio_mturbo=.*
RewriteCond %{REQUEST_URI} ^/magento/$
RewriteCond %{QUERY_STRING} !.+
RewriteCond /var/ww/var/turbocache/default.html -f
RewriteRule .* var/turbocache/default.html [L]
# static rewrite - other pages
RewriteCond %{HTTP_COOKIE} store=default
RewriteCond %{HTTP_COOKIE} !artio_mturbo=.*
RewriteCond %{REQUEST_URI} /magento/(.*)\.html$ [NC]
RewriteCond %{QUERY_STRING} !.+
RewriteCond /var/www/var/turbocache/magento/default/%1.html -f
RewriteRule .* var/turbocache/magento/default/%1.html [L]
# store view is choosen by request_path
# static rewrite - home page
RewriteCond %{HTTP_COOKIE} !artio_mturbo=.*
RewriteCond %{REQUEST_URI} ^/magento/default(/|)$
RewriteCond %{QUERY_STRING} !.+
RewriteCond /var/www/var/turbocache/default.html -f
RewriteRule .* var/turbocache/default.html [L]
# static rewrite - other pages
RewriteCond %{HTTP_COOKIE} !artio_mturbo=.*
RewriteCond %{REQUEST_URI} ^/magento/default/(.*)\.html$ [NC]
RewriteCond %{QUERY_STRING} !.+
RewriteCond /var/www/var/turbocache/magento/default/%1.html -f
RewriteRule .* var/turbocache/magento/default/%1.html [L]
#cookie
RewriteCond %{HTTP_COOKIE} !artio_mturbo=.*
RewriteCond %{REQUEST_URI} ^/magento/$
RewriteCond %{QUERY_STRING} !.+
RewriteCond /var/www/var/turbocache/default.html -f
RewriteRule .* var/turbocache/default.html [L]
# rules for default storeview
# static rewrite - home page
RewriteCond %{HTTP_COOKIE} !artio_mturbo=.*
RewriteCond %{REQUEST_URI} /magento/(.*)\.html$ [NC]
RewriteCond %{QUERY_STRING} !.+
RewriteCond /var/www/var/turbocache/magento/default/%1.html -f
RewriteRule .* var/turbocache/magento/default/%1.html [L]
到目前爲止感謝!
我得到的東西從後面轉換器,但它似乎並沒有給我回我需要什麼?我看到一些變種,但它似乎不能轉化爲我所需要的,或者我在這裏理解了不正確的東西? – Tom