Welcome! Log In Create A New Profile

Advanced

Rewrite issue

Posted by stevek 
Rewrite issue
April 23, 2010 11:19AM
Hello,
I have a number of rewrite rules in .htaccess which I am trying to get working in NGINX.
Here is an example:

RewriteRule contact-us/$ /contact.php?seo_url=contact-us [L]

Here is what I have tried in NGINX

location /contact-us/ {
rewrite /contact-us/
http://www.mydomain.com/client.php?seo_url=contact-us last;
}

The rewrite kind of works but what I want is the URL in the address bar to still say http://www.mydomain.com/contact-us/ after the redirect.
Could anyone please point me in the right direction?

Thanks
Re: Rewrite issue
April 23, 2010 11:23AM
Figured it out myself, I just had to use a relative URL instead of a complete want... doh
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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