Welcome Guest, Not a member yet? Register   Sign In
base url suddenly stopped working
#1

[eluser]johnmerlino[/eluser]
Hey all,

I have this configured in config.php:

Code:
$config['base_url']    = "http://hmlaw/";

Worked fine for a while. But as I added stuff to the site, now when I try to access it, I get a 404 Page Not Found error. This is running off my local host and I haven't changed the virtual host settings in apache (in fact I can access pages like http://hmlaw/home just fine). I temporarily removed everything in the routes to see if that was the cause, but even then I was getting 404. Not sure where else to look for problems.

Thanks for response.
#2

[eluser]Josh Holloway[/eluser]
Does your default controller still exist?

If you've delete the default controller you'll need to open the routes.php file and change:
Code:
$route['default_controller'] = "welcome";

to a controller that exists.
#3

[eluser]johnmerlino[/eluser]
Thanks for the response. When user enters url, a method gets called that dynamically generates content from database for that url, so I had to check whether there was indeed a uri segment and if not redirect to a page:

Code:
elseif(!$this->uri->segment(1)){
                redirect('homes');
            }




Theme © iAndrew 2016 - Forum software by © MyBB