Answer the question
In order to leave comments, you need to log in
Is it possible to translate ReWrite into nginx this code?
Hello everyone, I need to translate this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin *
</IfModule>
</FilesMatch>
AddType application/font-woff .woff
Answer the question
In order to leave comments, you need to log in
Add to mime.types
font/ttf ttf;
font/opentype otf;
application/font-woff woff;
application/vnd.ms-fontobject eot;
location / {
try_files $uri /index.php;
}
location ~ \.(ttf|otf|eot|woff)$ {
add_header Access-Control-Allow-Origin *;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question