Welcome! Log In Create A New Profile

Advanced

Re: [ASK] Redirect old domain to new domain

January 06, 2011 05:04AM
On 1/6/11 4:46 AM, antituhan wrote:
>
> Hi,
>
> I have an old domain& new domain, let's call the old domain is
> www.olddomain.com and the new one is www.newdomain.com.
> Yesterday, I've register the new domain (www.newdomain.com), but, the
> olddomain.com still active. Both of them can be accessed by user. But, in
> some direction (nginx.conf), i've limit the old domain can accessed some
> directory, but the new domain can access all directory in public_html.
>
> Could nginx make a rules, if the user access the site from olddomain.com,
> for example, the user access a file from www.olddomain.com/file.exe, will be
> redirected automatically to www.newdomain.com/file.exe. NginX Wiki doesn't
> provide this documentation. :(

server {
listen 80;
server_name www.olddomain.com;
rewrite ^ http://newdomain.com$request_uri? permanent;
}

>
> Thanks,
> antituhan


--
Jim Ohlstein

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

[ASK] Redirect old domain to new domain

antituhan January 06, 2011 04:50AM

Re: [ASK] Redirect old domain to new domain

Jim Ohlstein January 06, 2011 05:04AM

Re: [ASK] Redirect old domain to new domain

Jim Ohlstein January 06, 2011 05:04AM

Re: [ASK] Redirect old domain to new domain

antituhan January 06, 2011 09:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 109
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready