0

I know this question has been asked one thousand time. But I have problem applying it to my project however.

What I do: I have copied the following code (suggested by CI Docs) in .htaccess file in my application folder:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

PROBLEM: it does not work and it throws 404 or Internal Error. I also have tries creating new .htaccess file in my root folder, or copying the above code in system folder's .ht . none of them works. 404 or internal error are inervitable

3 Answers 3

3

paste the following code in your htaccess file inthe root folder

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

and the in the config.php file change the line with

$config['index_page'] = '';

please let me know if you face any problem.

Sign up to request clarification or add additional context in comments.

5 Comments

where you have copied this code? in root folder or in application folder?
if you copied the code in your root .htaccess file then put "Deny from all" in the .htaccess file inside application folder.
it still throws 500 Internal Error
I have set both system's and applications .ht to "Deny from all". also removed index.php as the base Index file.
can you provide me your url?
0

Try this

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

and in config.php

$config['index_page'] = '';

Comments

0

Thanks everybody. it is done. The problem was that I had not activated the APACHE rewire_module

Sorry if I wasted your time.

thanks

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.