Welcome Guest, Not a member yet? Register   Sign In
Codeigniter .htaccess on Bluehost
#1

[eluser]Unknown[/eluser]
Hi all,

I was working on some codeigniter project for government hosted on bluehost.

This is my first shared hosting experience with codeigniter (time to see the app working on a real environment Wink )

But then, I have found that the "default" .htaccess file does not work. Searching on codeigniter forums, and other sites, and making some tests leads me to this file that works:

Code:
AddHandler application/x-httpd-php5 .php
RewriteEngine on
RewriteCond $1 !^(index\.php|img|js|css|cms|services|robots\.txt)
RewriteRule ^(.+)$ index.php?$1 [L]

Note that the "default" .htaccess file has this rewrite rule:

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

and the new one has this one:
Code:
RewriteRule ^(.+)$ index.php?$1 [L]

This is passing the uri segment after "somedomain.com/" as a GET parameter for index.php

I hope this helps Wink
#2

[eluser]featureBlend[/eluser]
cheers, i'm on bluehost as well so this will come in handy...
#3

[eluser]marinaccio[/eluser]
Thank you!!!
#4

[eluser]rampelli[/eluser]
hi all

the above code which you specified does not work on my bluehost server

you can check it at

http://www.subhodaya.com




Theme © iAndrew 2016 - Forum software by © MyBB