CodeIgniter Forums
using url helper to bypass htaccess/bluehost config problems.. for now? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: using url helper to bypass htaccess/bluehost config problems.. for now? (/showthread.php?tid=53016)



using url helper to bypass htaccess/bluehost config problems.. for now? - El Forum - 07-07-2012

[eluser]bradyrose[/eluser]
Hey guys,

Ive been struggling to get a .htaccess file working on my bluehost account, im having that issue when you load any other page aside index that, every time you click on a link in my nav bar it tacks on an index.php/, so after the first click on a link, you end up with things like www.website.com/index.php/index.php/page

I've followed instructions on htaccess file contents on other pages, specific to bluehost, yet still have not managed to get it to function right. Bluehost live support chat, was far from helpful.

If someone knows how i can actually get the htaccess file fixed this would be great, but I do recall someone saying something in the chat room in passing i could use the url helper to remedy the situation, although looking at the user guide on the url helper is not quite getting me there. So that's why i am here asking Tongue

So could any one show me a snippet of code showing how to create a link to a page such as www.cashforbtc.com/index.php/exchange


using url helper to bypass htaccess/bluehost config problems.. for now? - El Forum - 07-07-2012

[eluser]Aken[/eluser]
Does it work without an .htaccess file? Sounds more like a relative URL issue than anything...


using url helper to bypass htaccess/bluehost config problems.. for now? - El Forum - 07-07-2012

[eluser]bradyrose[/eluser]
it was doing this before I ever had an htaccess file.


using url helper to bypass htaccess/bluehost config problems.. for now? - El Forum - 07-07-2012

[eluser]Aken[/eluser]
1) What is your $config['base_url'] set to in your config file? It should NOT have index.php in it.

2) Use the site_url() or anchor() URL helper functions for generating links in your application, if you want to produce the proper URLs.