Welcome Guest, Not a member yet? Register   Sign In
Routing Issue - Related to Capitalization
#1

Hey all, I'm running two applications out of a single system folder (runs well on localhost), and having trouble with the second application routing properly.

Application 1 (The Public Site)
Application 2 (The Admin/CMS)
  • Application sits in "/admin" directory at the site root.
  • File and Class names were changed here as recommended in the upgrade guide, but things aren't working as expected. I am receiving 404s when visiting URLs that are not capitalized like their File/Class names
  • As an example: visiting /admin/login throws a 404. Visiting /admin/Login resolves correctly. Controller file is Login.php and begins with 
    class Login extends Simple_Controller
Additional Info:
  • /admin Application makes use of an extended CI_Controller class. MY_Controller extends CI_Controller, Simple_Controller extends MY_Controller for routes that do not require authentication, while Authenticated_Controller extends MY_Controller for routes that require Authentication.
  • Both applications run inside of the directory ".application" within their respective locations.
  • Both application share a single system directory at the root of the site.
  • Application 2 runs in the "/application" directory.
Has anyone dealt with issues like this? A little confused why case-sensitivity applies in a child-directory of the site root, but not at the site root.

- Ian
Reply
#2

SOLVED

Quite foolish to not catch it sooner, but fresh eyes always help.

I had extended the Router class in the old 2.X.X version of my application to allow hyphens in routes globally. Removing the MY_Router from my application solved the issue (and is no longer required now that CI 3 allows for the option of hyphens in routes).
Reply




Theme © iAndrew 2016 - Forum software by © MyBB