I have migrated CodeIgniter from 2.4 to 3.1 but the URL routing is not working when base_url is set to domain name.
Issue raised this issue in the below forums:
[login to view URL]
[login to view URL]
Please go to the Forum to understand bit more about this issue.
Below is some information as posted in StackOverflow:
I am having URL routing issue in CodeIgniter 3.1.9, and would appreciate if someone could help me with this problem. This routing has worked perfectly in CodeIgniter 2.4 and earlier.
Below is the working [login to view URL] in codeigniter 2.4
$route['default_controller'] = "home";
$route['404_override'] = '';
$route['home'] = "home";
$route[test1] = "home";
$route[test2] = "home";
$route[test3] = "home";
$route['test1/select-product] = "home/SelectProduct";
$route['test2/select-product] = "home/SelectProduct";
$route['test3/select-product] = "home/SelectProduct";
Below is web page directory structure and its mapping:
Web root directory structure:
├── test1-> /var/www/html/
├── test2-> /var/www/html/
├── test3-> /var/www/html/
├── [login to view URL]
/var/www/html/test1 is symbolic link to /var/www/html
/var/www/html/test2 is symbolic link to /var/www/html
/var/www/html/test3 is symbolic link to /var/www/html
"assets" directory has all the customisation for each pages inside test1, test2 and test3.
This set up is working perfectly in CodeIgniter 2.4 using the Public IP or domain name. In the latest version, it is still working when browsed using the private IP with base_url left emply in config.php.
However, in CodeIgniter 3.1.9, when I press continue after filling the form in any of the [login to view URL][1,2,3...] URL, the page returns back to base_url https://example.com.
[login to view URL] points to /var/www/html and is the base_url.
The form for each sub-directories (test1/test2/test3) loads in the correct customised format, but when I press continue to proceed to the next page, it routes it back to [login to view URL]
When I click continue on the form located at [login to view URL] it should route to [login to view URL] and likewise for test2 and test3
Please accept this job only if you are an expert in CodeIgniter, PHP and Apache. Agreed payment will be only paid once your recommendation works as expected.
I can allow team viewer access to the right person to work with me to resolve this issue.
31 freelancere byder i gennemsnit $121 på dette job
Hi I am a PHP developer. I can fix your issue. I'll try my best to solve this issue as soon as possible. Please come in the chat box for more discussion. Thanks