I have a CodeIgniter site and the problem is I have:
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
But this results in people going from example.com to http://www.example.com/index.php/
I’d like them simply to go to http://www.example.com
Any ideas? Also, if they’re at example.com/page1 they should go to http://www.example.com/page1
Thanks
Apache is rewriting
/to/index.php/before that rule is processed. Try moving it to the top of the file.