Welcome! Log In Create A New Profile

Advanced

How to URL rewrite on this case

Posted by hankycheng 
How to URL rewrite on this case
September 05, 2011 06:44AM
Hi all ~

I have a question about URL rewrite

for example, I want to rewrite from http://www.testing123.com/abc.php?id=wuDN to ttp://zxy.com/abc.php?id=wuDN

How to do this. Tks all brother!

Hanky
Re: How to URL rewrite on this case
September 05, 2011 09:54PM
If you want to rewrite all requests from www.testing123.com to zxy.com with the same URI structure:


server {
listen 80;
server_name www.testing123.com;
rewrite ^ http://zxy.com$request_uri? last;
}

If you want to only rewrite some requests you'll need to use a combination of locations and regex with external redirects depending on the use case.

--
Jim Ohlstein
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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