I have uploaded my web project using codeigniter on the server godaddy and I can access it thru this link http://izhi-ks.org/facelajm/blog
I have bought a new domain www.facelajm.com for this site, and I have updated the directory to /facelajm and I get 404 Page Not Found error.
so my ftp looks like this:
in the root I have another site which is joomla and within that dir I ahave a folder called facelajm.
In the codeigniter root dir i have a .htaccess like this:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
What I am doing wrong, that I cant open the site only by typing www.facelajm.com In fact it does if i only create a new index.php and print hello world... I am doubting on the htaccess or maybe config file?
here is config.php as well:
$config['base_url'] = "";
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
Change your .htaccess in the facelajm directory (which should be the root of your domain) to the following. I think you forgot to turn on RewriteEngine and forgot to set RewriteBase:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Update
A default controller needs to be set in routes.php
$route['default_controller'] = 'blog';
If you using Codeigniter V3, check the first letter of your controller is in upper case, example:
ci/application/controllers/dealer/Api.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With