I have a Project in Codeigniter that will be in two languages, however I need to allow this language change only in the project URL;
In other words, when accessing the domain.com it should maintain as a base url / pt on all pages and consecutively the same thing with / en;
Has anyone ever had to do this? Here is the code for my .htaccess, config and constants:
Htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^www\.(.*)
#RewriteRule (.*) http://%1/$1 [R=301,L]
RewriteBase /cliente/em_desenvolvimento/back/mauricio/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</ifModule>
Config:
$config['base_url'] = 'http://192.168.110.4/cliente/em_desenvolvimento/back/mauricio/';
Constants:
define('PATH_FRONT_END', $_SERVER['DOCUMENT_ROOT'] . '/cliente/em_desenvolvimento/back/mauricio/');
define('PATH_FRONT_END_UPLOAD', $_SERVER['DOCUMENT_ROOT'] . 'cliente/em_desenvolvimento/back/mauricio/web_files/uploads/');
I think something can be done on routes, but I have no idea how this can be done.