Requested URL was not found on this server - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Requested URL was not found on this server (/showthread.php?tid=33899) Pages:
1
2
|
Requested URL was not found on this server - El Forum - 09-12-2010 [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> Code: <?php My view: Code: <?php Nice and simple, but I can't display the page. Code: Not Found 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 Code: $config['base_url'] = "http://localhost/"; but no joy! help Requested URL was not found on this server - El Forum - 09-12-2010 [eluser]InsiteFX[/eluser] I would take a look at your base_url and directory structure. Also check your index.php file and make sure it is aetup for the right paths to the system and application folders. InsiteFX Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]1cookie[/eluser] hi [quote author="InsiteFX" date="1284340053"]I would take a look at your base_url. [/quote] With base_url set to: Code: $config['base_url'] = "http://localhost/"; Code: $config['base_url'] = "http://example.com/"; and with routes.php, set to: Code: $route['default_controller'] = "welcome"; upon visiting: Code: http://localhost/CodeIgniter/ Quote:and Directory structure looks like <a href="http://webtechnologies.me.uk/img/dirStrcture.png">this</a>. I can't see any immediate problems here? Quote:Also check your index.php file and make sure After checking 'http://ellislab.com/codeigniter/user-guide/general/managing_apps.html', I don't think any of this applies to me? I mean, I'm not: > Renaming my Application Folder > Relocating my Application Folder > Running Multiple Applications with one CodeIgniter Installation It's simply a clean default install for all intents and purposes. However, my index.php is: Code: <?php Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]WanWizard[/eluser] Assuming you have installed CI in the folder 'CodeIgniter' of your webserver docroot, and your .htaccess is placed in this folder (and not in the docroot), you will need Code: RewriteBase /CodeIgniter Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]1cookie[/eluser] hi [quote author="WanWizard" date="1284391498"]Assuming you have installed CI in the folder 'CodeIgniter' of your webserver docroot[/quote] It is! Quote: and your .htaccess is placed in this folder (and not in the docroot) It is. See <a href="http://webtechnologies.me.uk/img/dirStrcture.png" target="_black">screen shot</a> Quote: you will needUpon making these changes, and entering Code: http://localhost/CodeIgniter/Hello/you Code: The requested URL /CodeIgniter/Hello/you was not found on this server. I don't usually have any problems with a clean install? Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]pickupman[/eluser] Have you tried /CodeIgniter/hello/you ? Controllers have lowercase uri's but are capitalized only in their declaration. Try changing in your .htaccess Code: RewriteRule ^(.*)$ index.php?/$1 [L] to Code: RewriteRule ^(.*)$ index.php/$1 [L] Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]1cookie[/eluser] hi, and thanks for the tips everyone! [quote author="pickupman" date="1284400617"]Have you tried /CodeIgniter/hello/you ? Controllers have lowercase uri's but are capitalized only in their declaration.[/quote] Yes, have tried: Code: http://localhost/CodeIgniter/hello/you but still, 404 Not Found. Quote:Try changing in your .htaccess Made those changes (and restarted Apache), but no joy! Really puzzles me this.. Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]pickupman[/eluser] Don't forget since you are on linux, filenames are case sensitive. Do you have application/controllers/Hello.php or /application/controllers/hello.php? The latter is what you would want. Also, are you getting an apache 404 or a CI 404 error? Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]1cookie[/eluser] hi [quote author="pickupman" date="1284401967"]Don't forget since you are on linux, filenames are case sensitive. Do you have application/controllers/Hello.php or /application/controllers/hello.php? The latter is what you would want. [/quote] Full path is: Code: var/www/CodeIgniter/system/application/controllers/hello.php so the file is named 'hello.php', lower-case. Quote:Also, are you getting an apache 404 or a CI 404 error? It's an Apache 404 Code: Not Found Requested URL was not found on this server - El Forum - 09-13-2010 [eluser]pickupman[/eluser] Have you allowed .htaccess files in your apache config? Not in ubuntu right now, but I believe it's /etc/apache2/conf/httpd.conf (or site-default). You need to have Code: AllowOverride All The apache error means it's not getting to CI. CI has it's own 404 error. Out of curiosity what happens if you remove the leading / from /index.php in your .htaccess? Or better yet, try using just this in .htaccess Code: RewriteEngine On |