I have applied these NGINX settings to make it work for .htaccess rewrite rule
location / {
try_files $uri $uri/ /index.php?qa-rewrite=$uri&$args;
}
location /index {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
root html;
try_files $uri =404;
fastcgi_read_timeout 300;
fastcgi_pass unix:/opt/bitnami/php/var/run/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
includefastcgi_params;
}
I have also applied setting to work for custom 404 page by q2a
here is code, just add in config file:
error_page 404 /404.html;
location = /404.html {
try_files $uri $uri/ /index.php?qa-rewrite=$uri&$args;
}
Everything is working well on NGINX server but the two error I got while testing the site. HERE are the result:
This is my complete configuration:
location / {
try_files $uri $uri/ /index.php?qa-rewrite=$uri&$args;
}
location /index {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
root html;
try_files $uri =404;
fastcgi_read_timeout 300;
fastcgi_pass unix:/opt/bitnami/php/var/run/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
includefastcgi_params;
}
error_page 404 /404.html;
location = /404.html {
try_files $uri $uri/ /index.php?qa-rewrite=$uri&$args;
}
I expect help from anybody regarding this.
Thanks in advance