Welcome! Log In Create A New Profile

Advanced

Re: try_files and GET variables

All files from this thread

File Name File Size   Posted by Date  
patch.try_files.746 326 bytes open | download Igor Sysoev 03/30/2009 Read message
Reinis Rozitis
March 30, 2009 11:14AM
> The attached patch fixes the bug.

It fixed the garbage part then again QUERY_STRING is now empty at all.. Or is this expected?


In short what I try to archieve is this - if you have:

location /tmp {
try_files $uri /index.php;
}

And open something like http://myserver/tmp/somecategory/another/?id=234 php still gets 'id' as normal GET variable..



The rewrite or error_page alternative would be:

rewrite ^/tmp/(.*)$ / last;

location /tmp/ {
error_page 404 = /index.php;
}




I somehow see this conflicting if you specify something like this in the config

location /tmp {
try_files $uri /index.php?q=$request_uri;
}

Then again it gets messy if you want to split the query_string on php side and assign all the variables.. Besides try_files looks
way more superior than both previous approaches..


wbr
rr
Subject Author Posted

try_files and GET variables

Reinis Rozitis March 30, 2009 09:47AM

Re: try_files and GET variables Attachments

Igor Sysoev March 30, 2009 10:17AM

Re: try_files and GET variables

Reinis Rozitis March 30, 2009 11:14AM

Re: try_files and GET variables

Igor Sysoev March 30, 2009 11:48AM

Re: try_files and GET variables

Reinis Rozitis March 30, 2009 12:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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