I’ve developed an application for a client that currently uses the URL structure https://project.es/index
. Now, they need to switch to https://project.es/apps/other_segment/index
.
I’ve adjusted base_url
in config.php
, updated .htaccess
for RewriteBase, and modified routes in routes.php
. However, each fix seems to break another part of the application.
How can I seamlessly integrate the /apps/other_segment/
structure into my URLs without causing errors or extensive modifications?
Configuration:
.htaccess:
RewriteBase /
config.php:
$config['base_url'] = '``http://www.project.es/``';
routes.php:
$route['default_controller'] = 'login/index';
$route['404_override'] = 'notfound';
$route['translate_uri_dashes'] = TRUE;
$route['(w{2})/loginadmin'] = "loginadmin/index";
$route['(w{2})/(.*)'] = '$2';
$route['(w{2})'] = $route['default_controller'];
I’m using MY_Lang.php
for language management, but unsure if it’s causing issues.
Despite adjustments, fixing one problem often creates new ones.