We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

After Install on Server, 404 Errors?

Development and Programming

Vik's avatar
Vik
209 posts
12 years ago
Vik's avatar Vik

I’ve got several web apps running on CI. I’m moving a new one from my development environment to the server, and for some reason I’m getting 404 errors.

Here’s my index function from my welcome controller:

function index()
{
 redirect('/auth/login/');
        [.....]

The redirect runs but gives me a 404 error. Here’s my file and folder layout:

public_html
--client_folder/
----application/
------cache/
------config/
------controllers/
------core/
------errors/
------helpers/
------hooks/
------index.html
------language/
------libraries/
------logs/
------models/
------third_party/
------views/
----system/

In index.php, I have the following options:

$system_path = 'system';
$application_folder = 'application';

in routes.php, I have the following options:

$route['default_controller'] = "welcome"

in config.php, I have the following options:

$config['base_url'] = "http://" . $_SERVER['HTTP_HOST'] . "/client_folder/";

How can I correct my options so as to avoid the 404 error?

Thanks very much in advance to all for any info.

       
Vik's avatar
Vik
209 posts
12 years ago
Vik's avatar Vik

I tried moving the application folder inside the system folder, but I’m still getting the same error.

public_html
--client_folder/
----system/ 
------application/

This is driving me crazy. 😊 I wonder if it has something to do with it that this is the first time I’ve used CI 2.x rather than CI 1.7? If anyone has anything I can try, please let me know!

       
457613786's avatar
457613786
2 posts
12 years ago
457613786's avatar 457613786

I do not know, but it’s a very interesting question!

       
Vik's avatar
Vik
209 posts
12 years ago
Vik's avatar Vik

Solved! My web host requires the following line in the htaccess file to enable a php5 web app:

AddType application/x-httpd-php5 .php
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.