C
C
chicha2292014-02-18 19:01:05
Apache HTTP Server
chicha229, 2014-02-18 19:01:05

Translation of .htacces to gnix conf: how to rewrite rewriterule to ngnix format correctly?

I decided to switch to vps from DO. Installed stock settings with vesta panel (Apache + ngnix). But there is a problem - I can not correctly rewrite the rewriterule in the ngnix format.
Here is the .htaccess itself:

AddDefaultCharset UTF-8

Options +FollowSymLinks
Options -Indexes

RewriteEngine on

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/x-icon "access 1 year"
ExpiresByType application/x-shockwave-flash "access 1 year"
ExpiresByType application/javascript "access 1 year"
ExpiresByType application/x-javascript "access 1 year"
ExpiresByType text/css "access 1 year"
ExpiresByType text/html "access 1 year"
</IfModule>

RewriteRule ^(.*)\.tpl$ [R=404]
RewriteRule ^(.*)\.zip$ [R=404]

RewriteCond $1 !^(index\.php|user_guide|uploads/.*|favicon\.ico|docs|favicon\.png|captcha/.*|application/modules/.*/templates|application/modules/.*/assets/js|application/modules/.*/assets/css|application/modules/.*/assets/images|CHANGELOG.xml|templates|js|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question