Answer the question
In order to leave comments, you need to log in
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question