Welcome Guest, Not a member yet? Register   Sign In
Requested URL was not found on this server
#1

[eluser]1cookie[/eluser]
hi

I'm having trouble with a simple script. My setup is: Apache and Ubuntu. I'm using mod_rewrite on my localhost. My .htaccess file looks like:

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    #When your application folder isn't in the system folder
    #This snippet prevents user access to the application folder
    #Submitted by: Fabdrol
    #Rename 'application' to your applications folder name.
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>
and is placed under my CodeIgniter directory. My controller:

Code:
&lt;?php

class Hello extends Controller {

        function __construct() {
                parent::Controller();

        }

        function you() {
                $this->load->view('my_view');
        }


}
/* End of file hello.php */
/* Location: ./system/application/controllers/hello.php */

My view:

Code:
&lt;?php

echo 'hello';

/* End of file my_view.php */
/* Location: ./system/application/views/my_view.php */

Nice and simple, but I can't display the page.

Code:
Not Found

The requested URL /CodeIgniter/Hello was not found on this server.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80

I've checked all the usual suspects:

error.log displays:

Code:
Sun Sep 12 17:29:31 2010] [error] [client 127.0.0.1] File does not exist: /var/www/CodeIgniter/Hello
[Sun Sep 12 17:29:32 2010] [error] [client 127.0.0.1] File does not exist: /var/www/CodeIgniter/Hello
[Sun Sep 12 17:42:27 2010] [error] [client 127.0.0.1] File does not exist: /var/www/CodeIgniter/Hello

Code:
$config['base_url']    = "http://localhost/";

but no joy!

help


Messages In This Thread
Requested URL was not found on this server - by El Forum - 09-12-2010, 10:58 AM
Requested URL was not found on this server - by El Forum - 09-12-2010, 02:07 PM
Requested URL was not found on this server - by El Forum - 09-13-2010, 03:07 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 04:24 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 04:42 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 06:56 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 07:10 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 07:19 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 07:27 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 07:44 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 07:54 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 08:14 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 08:57 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 09:31 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 09:38 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 10:02 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 10:26 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 10:32 AM
Requested URL was not found on this server - by El Forum - 09-13-2010, 10:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB