MyBB Community Forums

Full Version: rewrite NGINX portal.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
convert this APACHE rule:

DirectoryIndex portal.php

and

Redirect 301 /spam.php http://google.com

Huh
The DirectoryIndex goes into your server block, you probably already have a line similar to it so just add portal.php as the first preference:

...
    index portal.php index.php index.html;
...

The 301 will be a seperate block inside the server block:

server {
...
    location = /spam.php {
        return 301 http://google.com;
    }
...
}