Updated, I'm having some issues with deploying codeigniter project on Ubuntu server, i get 404 Apache error when i click on links.
When i put the project in http://roy.my-domain.com/ = /var/www/html/ folder - it's all works fine - but when i added sub directory http://roy.my-domain.com/roy/ = /var/www/html/roy/ - i get 404 errors .
When my url is http://roy.my-domain.com/roy/index.php/about - i get codeigniter 404 error and not apache2.
The error :
Not Found
The requested URL /index.php was not found on this server.
Apache/2.4.18 (Ubuntu) Server at roy.my-domain.com Port 80
Here are my settings :
0 . Checked for rewrite mod in Apache - got "Module rewrite already enabled"
1 . My project is in /var/www/my-project/
2 . In contains the following : application system public_html index.php .htaccess
-
The .htaccess file :
< IfModule mod_rewrite.c > RewriteEngine On RewriteBase /html/my-project/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
< /IfModule > < IfModule !mod_rewrite.c> ErrorDocument 404 index.php < /IfModule >
-
The apache2.conf :
< Directory /var/www/ > Options Indexes FollowSymLinks Require all granted < /Directory >
< Directory /var/www/html/ > Options Indexes FollowSymLinks AllowOverride All Require all granted < /Directory >
-
The config.php :
$config['base_url'] = 'http://roy.my-domain/my-project/'; $config['index_page'] = ''; $config['uri_protocol'] = 'AUTO';
-
The index.php :
(don't work with ../system and ../application) $system_path = 'system'; $application_folder = 'application';
-
The controllers :
(codeigniter default view) Welcome.php About_Controller.php
The views: (codeigniter default view) welcome_message.php about.php
Locally - all works fine...Thanks