Welcome Guest, Not a member yet? Register   Sign In
CI 1.7: ORIG_PATH_INFO and URI Class
#2

[eluser]Nameless One[/eluser]
I encountered this problem in 1.7.1 and bypassed it the same way. I don't think this case is very rare. If I understand the $_SERVER variable correctly, as server without PATH_INFO and with empty QUERY_STRING will always have ORIG_PATH_INFO == SCRIPT_NAME when there's no URI segment that defines an application.

In my case, the URL www.mywebsite.com/section/subsection, which is rewritten to index.php and routed to www.mywebsite.com/controller/action/subsection, doesn't work because both ORIG_PATH_INFO and SCRIPT_NAME will be /section/subsection. However, the URL www.mywebsite.com/admin/section/subsection, which is rewritten to admin.php and routed to www.mywebsite.com/application/controller/action/subsection, works because SCRIPT_NAME is /admin/section/subsection and ORIG_PATH_INFO is /section/subsection. This happens because the application URI segment is part of the base path.

I think the only thing the CI developers need to do is add another if to handle the case when there are no directories in the base path and handle it without the str_replace() call.


Messages In This Thread
CI 1.7: ORIG_PATH_INFO and URI Class - by El Forum - 11-05-2008, 03:30 AM
CI 1.7: ORIG_PATH_INFO and URI Class - by El Forum - 11-18-2009, 04:43 PM



Theme © iAndrew 2016 - Forum software by © MyBB