0

My local xampp codeigniter projec's url was http://localhost/ci_yudeesh/index.php But then wanted to remove the index.php part from the url so I followed the steps given in the userguide.

After that i could access the project without index.php with the url http://localhost/ci_yudeesh/

I have a controller named Home and I can access this using http://localhost/ci_yudeesh/index.php/home , but when try to access this using http://localhost/ci_yudeesh/home it gives this error:

error image

this is my config:

$config['base_url'] = 'http://localhost/ci_yudeesh/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

this is my .htaccess:

<IfModule authz_core_module>
    Require all denied
</IfModule>
<IfModule !authz_core_module>
    Deny from all
</IfModule>

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

this is my route:

$route['default_controller'] = 'Home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

Can someone help me fixing this? I tried all the other answers to similar type questions but none worked.

2 Answers 2

3

Remove the .htaccess from the application folder and put it outside the application folder and written only the below code in it. If it not work then I will give you another .htaccess code.

RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
Sign up to request clarification or add additional context in comments.

Comments

0

Change the .htaccess file . Remove the codes from the existing file and add the following codes on the file :-

RewriteEngine on

RewriteCond $1 !^(index.php|resources|robots.txt)

RewriteBase /ci_yudeesh/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?/$1 [L]

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.