G
G
gremlintv22018-05-03 19:54:28
Nginx
gremlintv2, 2018-05-03 19:54:28

How to replace such locations ( Apache, htaccess, nginx, openLS)?

We decided to migrate from nginx to openLS, and there, as I understand it, location does not work, but rewrite is used instead as in apache, but since I have not encountered apache, could you tell me what actions I should take to figure out how to migrate these locations on apache:

#1
location ~* \.(?:json)$ {
add_header Access-Control-Allow-Origin *;
}
#2
location / {
try_files $uri $uri/ /index.php?$args;
}
#3
location /uploads/ {
root /var/www/project;
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gremlintv2, 2018-05-05
@gremlintv2

#1
Resolved via contexts
#2
Resolved via rewrite
RewriteEngine On
RewriteBase /
RedirectMatch 403 /\..*$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
#3
Decided via contexts
5aed96453b2bc829339024.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question