Welcome Guest, Not a member yet? Register   Sign In
Copied CI website from web server to mamp, links are still linked to live domain
#1

[eluser]Unknown[/eluser]
I've been searching around the forum for any solution. I thought this was a common issue (i don't know yet) but I didn't find any post that had the same problem as mine. So I felt the need to make a new post.

here is the thing
1. I didn't made the website
2. It'll be my first time to use code igniter framework if I push this through
3. Right now I'm just trying to setup the project on my MAMP

issue:
I downloaded the project from the web server to my MAMP htdocs dir.
I access the page locally
click on some links BUT the links brought me to the live website URL.

I inspected the elements and I saw the urls are all pointing to the website URL.
so what I did is go to config and change the base_url and tried
Code:
$config['base_url'] = '';
and
Code:
$config['base_url'] = 'http://localhost:8888/cybercafe/';
and
Code:
$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/';

the base_url before I changed it
Code:
$config['base_url'] = 'https://cyberwatchcafe.com/';


I thought only the hyperlinks were like this, but apparently the images source as well.
I've proven this as I try to rename a couple of images and see them still displaying on my local project.

thanks for the help cool CI people! :coolmad:
#2

[eluser]Tim Brownlaw[/eluser]
They may have hardcoded the url so the first thing to do would be to perform a search through the application folder looking for the domain name and replace it with base_url.
Also look in the folder where the CSS and any JS files are located...

#3

[eluser]Unknown[/eluser]
yeah I checked that, but nothing seems hardcoded. Do you want to look into all the files? I can let you view my dropbox if you want. just me your email.
#4

[eluser]Tpojka[/eluser]
If relative links are used, check if there is base tag in head of your view file(s).
#5

[eluser]InsiteFX[/eluser]
Also check the .htaccess file and see if it is set in there




Theme © iAndrew 2016 - Forum software by © MyBB