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


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
22 views
Decided to migrate to nginx for openLS, and there is as I understand it location does not work, and instead use rewrite in apache, but since I'm not experienced in work with apache could you please tell me what I must take action to understand how to migrate these locations for 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;
}
by | 22 views

1 Answer

0 like 0 dislike
#1
Decided using contexts
#2
Decided using rewrite

RewriteEngine On
RewriteBase /
RedirectMatch 403 /\\..*$
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

5aed96a635d2a722241578.png
#3
Decided using contexts
5aed96453b2bc829339024.png
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
4 answers
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users