Object not found |
http://localhost/CI220-CRUD/member_area/
autoload.php PHP Code: $autoload['helper'] = array('html','form', 'url'); controllers/member_area.php PHP Code: class Member_area extends CI_Controller { views/_member_area.php PHP Code: <!--script BEGIN--> views/_output_html.php PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> config/routes.php PHP Code: $route['default_controller'] = "welcome"; When I try to access : http://localhost/CI220-CRUD/member_area/ Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error. If you think this is a server error, please contact the [email=postmaster@localhost]webmaster[/email]. Error 404 localhost Apache/2.4.7 (Win32) OpenSSL/0.9.8y PHP/5.4.22
" If I looks more intelligence please increase my reputation."
It seems your .htaccess is not working correctly.
Try below steps: 1. Check if apache is configured to support .htaccess. Code: <Directory "/var/www/html"> 2. Put below .htaccess under CI220-CRUD folder if not exists or correct it if as per below example Code: <IfModule mod_rewrite.c> 3. Make sure, base_url config variable under config.php is set to as per below example Code: $config['base_url'] = 'http://localhost/CI220-CRUD'; 4. Make sure, index_page config variable under config.php is set to blank (Just check below example) Code: $config['index_page'] = ''; Try this and let me know if it works.
I did all the steps. Except that I do not know how to do (Step no. 1):
1. Check if apache is configured to support .htaccess. I do not know which file to modify in apache ?: <Directory "/var/www/html"> Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>
" If I looks more intelligence please increase my reputation."
You can also try your urls like below if you are unable to enable .htaccess support under your apache installation.
http://localhost/CI220-CRUD/index.php/member_area/ -------------------------------------------- I hope, you are on Windows Box. If you are using WAMP than follow below steps. Open my computer and travel to below folder. C:\wamp\bin\apache\Apache2.4.4\conf (My WAMP installation is under C:\wamp and your one might be different) open httpd.conf under notepad and look (Do CTRL+F for searching) for this directive "AllowOverride". It should be under <Directory "c:/wamp/www"> Options Indexes FollowSymLinks AllowOverride All #AllowOverride line should be like RED COLOR value. Order Deny,Allow Deny from all Allow from 127.0.0.1 Allow from ::1 Allow from localhost </Directory> Once modified, save it and than restart apache. Else Let me know your OS details...
For one your base_url should end with a forward slash /
Run phpinfo and see if mod rewrite is turned on in php.ini. Also if you leave the base_url blank CI will try to figure it out for you. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |