Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx problem accessing urls like /mytest:1 #414

Closed
huglester opened this issue Aug 22, 2011 · 1 comment
Closed

nginx problem accessing urls like /mytest:1 #414

huglester opened this issue Aug 22, 2011 · 1 comment

Comments

@huglester
Copy link
Contributor

Hello,

for testing purposes I have created these routes:
'mytest:1' => 'test/nginx', // does not
'mytest:a' => 'test/nginx', // works

So when I tried accessing the: /mytest:1 - I was always getting the homepage,
and accessing the /mytest:a - worked.

I tried var_dump() the $uri in the classes/uri.php at line 79:

  • while accessing "site.com/mytest:1" it was empty
  • while accessing "site.com/mytest:a" it was 'mytest:a'

BTW. if I tried to access from apache, $uri also had a leading slash, so:
"site.com/mytest:a" was "/mytest:a",
"site.com/mytest:1" was "/mytest:1".

Later, if I change line 68 of classes/uri.php:
from
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
to
$uri = $_SERVER['REQUEST_URI'];

it starts to work. ( I know it's temporary fix..)

I also tried looking at $_SERVER variables passed from nginx and apache, but those looked to me very similar...

Feel free to ask for more information!

cheers,
huglester

@DregondRahl
Copy link

Same thing happens in apache too, so its probably parse_url() considering the ':' as a port or something. =/

@dhrrgn dhrrgn closed this as completed in 7a5302f Aug 29, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants