views:

50

answers:

3

Hi ,

I am having a bit of a problem. I am duplicating my website to a test environment on a new server with a new domain.

I have it working fine with the database etc but here is my error.

On the live site if I click suppliers it goes to the page fine If I click it on the test environment it does not work.

These are two links

http://wvtest.co.uk/

http://theweddingvine.com/

The code to create the link is as follows:

<?php 
  echo anchor('search', 'Suppliers'); 
?>

The file and the folders are the same. Is there something in codeigniter which can direct the link ?

A: 

have you specified the correct base_path for your testing server in application/config/config.php file?

Check that please, this is the case mostly in such problems.

Sarfraz
Should I be changing the following ABSPATH
Oliver Bayes-Shelton
something like below:$config['base_url'] = 'http://wvtest.co.uk/';
Sarfraz
+1  A: 

Modify application/config/config.php and set:

$config['base_url'] = "http://{$_SERVER['HTTP_HOST']}/";

That will make your links work on either server.

bradym
A: 

You could change your base_url to

$config['base_url'] = 'http://wvtest.co.uk/';

or

$config['base_url'] = '/';
Thorpe Obazee