Welcome! Log In Create A New Profile


How can I add rewrite rule in nginx without changing existing configuration file

Posted by sharif.hossain 
Here is my nginx virtual host configuration file like example.conf

server {
listen 80 default_server;
listen [::]:80 default_server;

} I want to add a rewrite rule like rewrite ^/api/iop/(.*)$ /api/iop/api.php last; in example.conf virtual host configuration file.But I don't want to change existing example.conf config file.I need rewrite rule workable from new config file with same virtual host.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 102
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready