Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter .htaccess for use with Heart Internet
#1

[eluser]Mart[/eluser]
Here's a working .htaccess file for CodeIgniter projects hosted on Heart Internet.

It took me a long time to get this one working so hopefully I'll save someone the hassle...

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

Further details on my blog.
#2

[eluser]Zack Kitzmiller[/eluser]
Is there any difference at all from elliot's? http://codeigniter.com/wiki/mod_rewrite/
#3

[eluser]Mart[/eluser]
I had to remove the enclosing "ifmodule" and the RewriteRule is slightly different.

The various permutations in the wiki (which is usually my first stop when setting up on a different host to those I have .htaccess files for) didn't work for me.

Heart Internet also have this php5.ini file thing which forces their script engines to use PHP5 rather than the default PHP4. That's documented on their site, .htaccess file aren't however. The response from their support chimps was "work it out for yourself"
#4

[eluser]wakey[/eluser]
Sorry to drag up an old thread but I am using Heart Internet too and was wondering if you'd had any experience of using their SSL url with codeigniter?

I'd like to use it in a few places but I am running into problems and I think it is because of my htaccess rewrite to remove index.php.

The main page loads correctly but when I try to access functions in the controllers I get -
The requested URL /path/to/mysite.com/mysite/index.php was not found on this server.

If anyone has any ideas it would be much appreciated!
#5

[eluser]Mart[/eluser]
Sorry. I've not used SSL on Heart. I try to avoid them at all costs unless my customer insists...
#6

[eluser]wakey[/eluser]
Ah ok thanks for letting me know.

Any specific reason why you avoid them at all costs?
#7

[eluser]Mart[/eluser]
I just seem to have to do more work to get sites to work with Heart. .htaccess being a case in point. Their "d'know! sort it out yourself" approach to customer service grates too.
#8

[eluser]Narkboy[/eluser]
I'm looking at this as I run a Heart reseller account and develop for a wide range of clients. At the moment, I'm leaning towards actually putting the SSL inside a seperate CI application folder and basically having two sites - one to handle non-SSL and one to handle SSL. I'm assuming you're using their free version rather than the paid customer-url version?

When I get time I'm going to work on it further. I'll post any results as and when.

/B
#9

[eluser]Unknown[/eluser]
Unlimitedgb.com is incredible to us..I honestly thought that I would never be able to afford my own site. It is always a little scary ordering over the web hosting companies like heartinternet.co.uk, but I am so glad that I took a chance on unlimitedgb!"
#10

[eluser]Narkboy[/eluser]
[quote author="joshinagar12" date="1290717061"]Unlimitedgb.com is incredible to us..I honestly thought that I would never be able to afford my own site. It is always a little scary ordering over the web hosting companies like heartinternet.co.uk, but I am so glad that I took a chance on unlimitedgb!"[/quote]


Hahaha! Kudos - you actually bothered to do some homework before you spammed. Nice!

Honestly - for the price you're charging, I'm not surprised you "honsetly thought [you] would never be able to afford my own site.". Pricy ain't the word.




Theme © iAndrew 2016 - Forum software by © MyBB