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

space in base_url causes bug #6142

Open
RedDragonWebDesign opened this issue Jun 22, 2022 · 1 comment
Open

space in base_url causes bug #6142

RedDragonWebDesign opened this issue Jun 22, 2022 · 1 comment

Comments

@RedDragonWebDesign
Copy link

When placing CI3 a couple folders down from the root, and one of those folders is multiple words separated by spaces, CI3 does not handle spaces in folder names in base_url well, and this causes it to misidentify the controller class and method.

Steps to reproduce

  • Windows 10
  • Get an Apache web server running (can use XAMPP)
  • Set the web server's base directory to somewhere.
  • Make the following folders in the web server's base directory: '/Folder 1/Folder2/Folder3'. Note the space in Folder 1.
  • Download latest CI3, place in Folder3.
  • Configure whatever variables needed to get CI3 mostly running. For example setting $config['base_url'] = 'http://localhost/Folder 1/Folder2/Folder3/'; or $config['base_url'] = 'http://localhost/Folder%201/Folder2/Folder3/';
  • Turn on the profiler
  • Visit http://localhost/Folder 1/Folder2/Folder3/index.php. CI will load but it will not load $route['default_controller'] like it's supposed to, it will load the 404 page instead.
  • Look at the class/method section of the profiler. Will say 'Folder%201/Folder2' instead of the correct controller class and method.
@nguyenanhung
Copy link

Hi @RedDragonWebDesign , I don't think this is a problem, can you use vhosts to control them, or wrap them in a docker container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants