I am using Codeigniter 3 and setup a virtualbox using Puphpet. I am usgin Ubuntu 14.04 and Apache2. I have finally successfully been able to access my default controller route when I go to http://ip_address/ , but when I try to access another page it says Not Found.
I have my shared folder mounted to /var/www. I have also verified that all of my files are located here.
Any idea why the default controller loads, but says not found for the other pages?
EDIT: the .htaccess file is located in the root folder (/var/www) this is the contents of the .htaccess file:
# MAKE SURE TO LEAVE THE NEXT TWO LINES HERE.
# BEGIN DENY LIST --
# END DENY LIST --
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
AllowOveride All
I have also made changes to /etc/apache2/sites-available/10-default_vhost_80.conf
and /etc/apache2/sites-available/25-av_fv5lzxiyh2xc.conf
<Directory "/var/www">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>dexes FollowSymlinks MultiViews
UPDATE: If I enter my url like http://ip_address/index.php/login
the page is found if I enter my url like http://ip_address/login
the page is not found.
I got it working by editing the default config file here:
/etc/apache2/sites-available/000-default.conf
And I added this to the default config:
<Directory /var/www>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.