Skip to content

[documentation] Can anyone help with nginx rewrites? #55

@ghost

Description

Great looking and educational framework but I'm really struggling here and would appreciate any passing nginxexpers having a look.

I've played with some other basic MVC frameworks and never had the problem where a normal nginx try_file wouldn't work.

So, for example:

location /manage/login {
     try_files $uri $uri/ /manage/login/index.php;
}

But, of course, I can see from the .htaccess and application.php that this uses ?url= GET arguments.

So, 5 hours of reading http://wiki.nginx.org/HttpCoreModule#.24arg_PARAMETER and http://wiki.nginx.org/HttpCoreModule#.24args and http://nginx.org/en/docs/http/converting_rewrite_rules.html I've tried various of the following.... (the install folder is in manage/login

location /manage/login {
try_files $uri $uri/ /manage/login/index.php?url=$uri;
}

also

try_files $uri $uri/ /manage/login/index.php?url=$uri;
try_files $uri $uri/ /manage/login/index.php?url=$args;
try_files $uri $uri/ /manage/login/index.php?url=$uri$args;
try_files $uri $uri/ /manage/login/index.php?$args;

and other combinations of the above. No matter what I put, it always says:

You are in the controller home, using the method index()
You are in the View: application/views/home/index.php

I found another lost soul at http://forum.nginx.org/read.php?2,247614,247647#msg-247647 but again, he wasn't having much luck.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions