Im developing a simple php project using codeigniter. My htaccess looks like this
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
my base url is
$config['base_url'] = 'http://localhost/Achalaweerasooriya.github.io';
My index page is
$config['index_page'] ="";
my main controller class is LoginController.
When I run the project it calls the login controller and the url is
http://localhost/Achalaweerasooriya.github.io/index.php
this shows the login form. When I enter the logn details and click login it should validate the user. The href I've given for the login button is
href="<?php echo base_url('');?>LoginController/validate"
Then the url is displayed as
"http://localhost/Achalaweerasooriya.github.io/LoginController/validate"
which is logically correct.
but when I click the login button with correct username and password 404 error is generated saying object not found error says "Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.5.30"
but if I add index.php manually to the url (then the url looks as "http://localhost/Achalaweerasooriya.github.io/index.php/LoginController/validate"), then the correct page is displayed. As a solution I added index.php to the base url so that it looks like
$config['base_url'] = 'http://localhost/Achalaweerasooriya.github.io/index.php';
But then as ive used the base_url(); call to link the external css and javascripts, they stop responding as they should.
Please point me in the correct direction.Thanks in advance.
$config['base_url'] = 'http://localhost/Achalaweerasooriya.github.io/';- Mr. EDREQUEST_FILENAMEconditions ? - Gwendal