• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copied CI website from web server to mamp, links are still linked to live domain

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

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
$config['base_url'] = '';
$config['base_url'] = 'http://localhost:8888/cybercafe/';
$config['base_url'] = 'http://'.$_SERVER['HTTP_HOST'].'/';

the base_url before I changed it
$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:

[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...

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.

If relative links are used, check if there is base tag in head of your view file(s).

Also check the .htaccess file and see if it is set in there

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.