Sunday, August 30, 2020

nginx rewrite and redirect rule like .htaccess in apache

In order to rewrite for example:

https://www.teusonho.org/symbol/casa to /symbol.php=casa

You can use:

location /symbol {
         rewrite ^/symbol/([^/\.]*)$ /symbol.php?symbol=$1;
    }

No comments:

Post a Comment