Welcome Guest, Not a member yet? Register   Sign In
RewriteEngine in .htaccess doesn't seem to be working properly.
#1

[eluser]skcin7[/eluser]
Hi, all. I am new with CodeIgniter and have been reading the documentation. Right now I am having trouble with the RewriteEngine in the .htaccess file.

When I click on a new link in my application, a URL might show something like this:

http://www.nicholas-morgan.com/index.php...contact_me

However, I don't like that the "index.php" part is in there.

I read in the CI documentation, (specifically here: http://ellislab.com/codeigniter/user-gui.../urls.html) that you can easily rewrite the URLs by adding the following code into the .htaccess file and save it:

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

I save that text into a plaintext file and save it as ".htaccess" in my root directory of my application (where the index.php file is). However, the problem still persists.

I notice that there is another .htaccess file in the /applications/ directory. That file isn't different from this one, correct?

I am also somewhat new with apache and I am not sure how to get the RewriteEngine to work properly. Why is this not overwriting the "index.php" part of my URLs?

If somebody could provide valuable insight, that would be incredible. Ideally I would like somebody to write the file and explain to me what is actually happening in it.




Theme © iAndrew 2016 - Forum software by © MyBB