How do I remove a route segments from my base URL? For instance, I have these routes in my routes.php:
$route['default_controller'] = 'main_controller';
$route['users'] = 'user_controller';
$route['user/(:num)'] = 'main_controller/user/$1';
They all get routed normally, but in the view called by the
user() method all of the generated links (for .js, .css, .png files, etc...) have user/ inserted betweem base URL localhost/domain_name and file path (e.g. css/style.css), so all of those links (as you would expect) return 404 and the page isn't formatted properly.
If you need more info on the code in question, just comment what you need and I'll add it. Thanks in advance.
EDIT: If it's any help, echo base_url(); in the view prints out http://localhost/domain_name/.
/css/style.css).$config['base_url'] = 'http://localhost/domain_name/).$config['base_url'] = 'localhost/domain_name';which is not even close what I asked after seeing your comment. I am sharing my experience. If fully qualified URL path is not set, meaningscheme+host+path+trailing slashI was able to notice similar issues. Other thing you can check is browser cache: close all browser windows and try again but in private mode. That way you should be certain there ain't no caching pages.