Welcome Guest, Not a member yet? Register   Sign In
How to set / change base links
#1

[eluser]Unknown[/eluser]
Not sure if the title is exactly right. I am a total n00b when it comes to MVC frameworks, though I know my way around PHP fairly well and am familiar with objects (though far from an expert). Anyways, I have taken over a project from someone else who no longer works at the company.

On our development server, he had his own development folder like this: www.oursite.com/john/newsite/ where he had a codeigniter framework site going. Mine is: www.oursite.com/marc/newsite/. I transfered all his files to my folder.

Looking at his code, he has links like this in one of the view files I need to edit:

<a href="startups/">

Yet when I view the actual page from my browser in my folder, at www.oursite.com/marc/newsite/, the "startups" link goes to www.oursite.com/john/newsite/startups/, when I need it to go to www.oursite.com/marc/newsite/startups/. How can I switch the 'base' url?

Not sure if this is needed, but I checked the config file at application->config->config.php, which shows:

$config['site_domain'] = ENV_BASE_URL;
$config['site_protocol'] = 'http';
$config['index_page'] = '';
$config['url_suffix'] = '';

I am really lost and don't know where to go from here. Any help is greatly appreciated.
#2

[eluser]jmadsen[/eluser]
Magic_Knight,

the default code is:

$config['base_url'] = 'http://www.oursite.com/john/';"

in the config file. The config file you listed is what is used by Kohana. So first,confirm which framework is really being used.

If it is some sort of bootstrapped CI, then he must rework your code into the $config['base_url'] variable somewhere, so grep for that




Theme © iAndrew 2016 - Forum software by © MyBB