Search code examples
phpcodeigniterftp-serverbase-url

Base URL for CodeIgniter installation


I have an FTP server (abc.xyz.com), and I want to install CodeIgniter in the ftp server. I followed the instructions at, CodeIgniter Installation for installing it.

I used FileZilla to copy CI to the root directory of the ftp server. But In Step 3) “set your base URL”, I tried giving the URL of the ftp server. But it does not work. How should I give the base URL. As am new to PHP/CodeIgniter I am not sure how it should be given.

I checked the routes.php and the default controller, welcome.php. It looks fine. But I am not getting the, “Welcome to CodeIgniter” message. Also I checked the same using XAMPP in my local host and it works fine. i.e. After copying CI to 'htdocs', I am able to see CI's Welcome message.

How can I check if CodeIgniter is installed successfully on the ftp server.


Solution

  • How should I give the base URL?

    Try leaving it blank. Codeigiter will do it's best to automatically "guess" the base url, based on some $_SERVER variables.

    The CI documentation looks like it needs to be updated, this feature was added in version 2.0.0.