M
M
ML2017-06-14 18:28:29
Nginx
ML, 2017-06-14 18:28:29

What would such a rule look like in nginx?

<IfModule mod_rewrite.c>
RewriteEngine On
Options -Indexes
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php [L]
#Header always append X-Frame-Options DENY
</IfModule>


<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/css

<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>

</IfModule>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-06-14
@BorisKorobkov

try_files $uri $uri/ /index.php;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question