1

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>

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

What do you mean by .htaccess rewrite ? I have edited the original question post. See that.
0

My virtual Host Configuration:

 <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>

And my file .htaccess :

<ifModule mod_rewrite.c>                                                                                                                           
       RewriteEngine On                                                                                                                               
      RewriteCond %{HTTP_HOST} ^IP$ [NC]                                                                                                     
       RewriteCond %(REQUEST_FILENAME) !-f                                                                                                            
       RewriteCond %(REQUEST_FILENAME) !-d                                                                                                            
      RewriteCond $1 !^(index\.php|css|images|js|robots\.txt)                                                                                         
       RewriteRule ^(.*)$ ./index.php/$1 [L]                                                                                                          
   </ifModule>                                                                                                                                        
   <ifModule !mod_rewrite.c>                                                                                                                          
      ErrorDocument 404 /IP/CodeIgniter_2.0.2/index.php                                                                                        
  </ifModule>    

It works great!! :)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.