Welcome! Log In Create A New Profile

Advanced

Re: Simple rewrite (redirection)

November 24, 2011 05:08AM
On Wed, Nov 23, 2011 at 02:46:13PM -0500, EricTheRed03 wrote:
> Hi Guys,
>
> In my HTTP config section in the config file, I would like to implement
> a redirection based on this scenario:
>
> If the URL is not "http://sitea.com/exactmatch" then redirect to the
> "https" home. else go to our hidden url (our testing boxes)
>
> #logic would be somthing like this..
> If (The URL is anything but "/ahiddenurl")
> {
> go to "https://sitea.com"
> }
> else
> {
> go to "http://hiddenurl"
> }
>
> Is this possible in the nginx.conf file?? Any help would be so very much
> appreciated!

server {
listen 80;
server_name sitea.com;

location / {
return https://sitea.com;
}

location /hiddenurl {
...
}
}


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Simple rewrite (redirection)

EricTheRed03 November 23, 2011 02:46PM

Re: Simple rewrite (redirection)

EricTheRed03 November 23, 2011 02:54PM

Re: Simple rewrite (redirection)

Valentin V. Bartenev November 23, 2011 03:18PM

Re: Simple rewrite (redirection)

Igor Sysoev November 24, 2011 05:08AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
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