shibly shibly - 7 months ago 16
PHP Question

Codeigniter error, file doesn't exist

http://mysite/products/create

Not Found

The requested URL /products/create was not found on this server.
Apache/2.2.16 (Debian) Server at site5.example.com Port 80


From server error =>

[Sun Aug 28 23:51:45 2011] [error] [client 127.0.0.1] File does not exist: /var/www/CodeIgniter_2.0.2/products


routes.php =>

$route['default_controller'] = 'products';
$route['404_override'] = '';


What would i do ?

Why is this error ?

In .htaccess file of CodeIgniter_2.0.2 =>

Deny from all


virtual host for codeigniter =>

<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName mysite.com

DocumentRoot /var/www/CodeIgniter_2.0.2

<Directory /var/www/CodeIgniter_2.0.2>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

</VirtualHost>

Answer

Unless you have a .htaccess rewrite the correct URL should be http://yoursite.com/index.php/products. Notice the inclusion of the index.php and the proper domain.