[eluser]philstan[/eluser]
I am developping a project for a client in CI for the first time and I love it. However, I am having a problem with some very strange and inconsistent behavior in the URLs of one page.
My view page has this simple line of code:
<a href="<?base_url();?>opportunities/newpost"><?php echo img('assets/images/new_post_button.gif');?></a>
Which points to this function in the Controller:
function newpost()
{
$data['title'] = "Upcoming Volunteer Opportunities New Posts";
$data['header'] = "Company Name";
$main_data['h1_title'] = "Upcoming Volunteer Opportunities - New Post";
$data['main'] = $this->load->view('opportunities/newpost_view',$main_data, TRUE);
$this->load->view('template', $data);
}
This SOMETIMES results in this:
http://.../opportunities/opportunities/opportunities/opportunities/opportunities/newpost
depending on how many time the new_post_button.gif is clicked.
As I said, this occurs sometimes and seems to have something to do with a forward slash after "opportunities". In other words this:
/opportunities/ (with forward slash) seems to cause the problem but /opportunities (without forward slash)
Thank you for your help