A
A
AlexanderSuz2014-09-22 14:55:42
Nginx
AlexanderSuz, 2014-09-22 14:55:42

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

In order to eat nginx.
Thank you all in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kompi, 2014-09-22
@kompi

Add to mime.types

font/ttf ttf;
font/opentype otf;
application/font-woff woff;
application/vnd.ms-fontobject eot;

And remove
the config
location / {
   try_files $uri /index.php;
}

location ~ \.(ttf|otf|eot|woff)$ {
   add_header Access-Control-Allow-Origin *;
}

D
dxpsite, 2015-10-13
@dxpsite

the fact is that composer is installed with all dependencies, it yells at a link like /chat/index.php/install that 404 , nothing was found

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question