Welcome Guest, Not a member yet? Register   Sign In
Controller Subfolder Structure - Prevent Root Access
#4

[eluser]xwero[/eluser]
insert following before all other code in the index method of the default controller
Code:
if(is_dir(pathinfo(__FILE__,PATHINFO_DIRNAME).$this->uri->uri_string()))
{
    show_404();
}
I didn't use the FCPATH constant because it's going to change in the following version of CI.


Messages In This Thread
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-13-2009, 01:17 PM
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-13-2009, 02:57 PM
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-13-2009, 08:38 PM
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-14-2009, 02:17 AM
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-15-2009, 02:50 PM
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-15-2009, 04:02 PM
Controller Subfolder Structure - Prevent Root Access - by El Forum - 03-16-2009, 04:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB