Welcome! Log In Create A New Profile

Advanced

Re: rewriting a url with a ? in it not working

December 20, 2009 08:56AM
On Sun, Dec 20, 2009 at 5:41 PM, jimxms <nginx-forum@nginx.us> wrote:
> Hi All,
>
> I've just recently moved over to nginx, so please excuse my stupidity if this is a really easy one to solve.
>
> I have the following URL:
>
> www.domain.net/content.php?/section/content_title/1
>
> which I am trying to rewrite to:
>
> www.domain.net/content/section/content_title/1
>
> I'm using the following in my nginx config:
>
> rewrite ^/content.php?/(\w*)/(\w*)/(\w*)$ /content/$1/$2/$3 last;
>
> however when I visit the URL to be rewritten the vars $1 $2 $3 are not being passed to the content script. Interestingly though, if I visit:
>
> www.domain.net/content.php/section/content_title/1  (notice the lack of ?)
>
> It works fine.
>
> Any assistance much appreciated.
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,32076,32076#msg-32076
>
>

I believe the arguments are not included in rewrite base string.


--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

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

rewriting a url with a ? in it not working

jimxms December 20, 2009 05:41AM

Re: rewriting a url with a ? in it not working

mike December 20, 2009 05:50AM

Re: rewriting a url with a ? in it not working

jimxms December 20, 2009 06:04AM

Re: rewriting a url with a ? in it not working

edogawaconan December 20, 2009 08:56AM

Re: rewriting a url with a ? in it not working

Maxim Dounin December 20, 2009 11:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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