I'm new in php codeigniter, i need to modify a project but i cant set the base url it redirects me to an external url and i can't edit anything in the project.
for example if I enter the project path, it redirects me to 'https://test.com'
I set the base url in application/config to localhost. But it does not work. this is my base url
$config['base_url'] = 'localhost/';
I have no idea what else could cause this problem I am very frustrated
Any idea or solution will be aprecciated.
Have a good day
I'm guessing, when you try the below you always get the value https://test.com ? You can search the project folder for that value if it is being overriden somewhere.
<?php echo base_url(); ?>
try check the .htaccess
file under your codeigniter file project maybe your .htaccess
set the url like this:
RewriteRule ^(.*)$ https://test.com/$1 [R,L]
change it to
RewriteRule ^(.*)$ https://localhost/yourfilename/$1 [R,L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.