• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to write corect a href links in ci?

#1
[eluser]sorin.ruse[/eluser]
Hi Guys,

I've started to develop an web app using ci and i'm somehow confused on how the urls are working.

Let me explain:
1. I have rewrite engine on;
2. My controler 'main' based on some validation points to the 'site' controler which loads the view 'site_view';
3. After the load of the view my url is: http:/mydomain.com/site;
4. On the site_view page i have an <a> tag pointing to the 'site/myfunction' myfunction beeing another function in the same controler 'site' that loads dinamicaly a certain portion of the 'site_view'.
5. At the first trigger of the <a> link everything is loading ok and now my new url is : http://mydomain.com/site/myfunction
PROBLEM:
If I trigger again the same <a> link my url will become: http://mydomain.com/site/site/myfunction and its quite clear that inside my 'site' controler there is no 'site/myfunction' but only 'myfunction'.

Question: Is the base_url().'site/myfunction' the only solution?

Thanks all in advance


Messages In This Thread
how to write corect a href links in ci? - by El Forum - 08-18-2014, 11:12 AM
how to write corect a href links in ci? - by El Forum - 08-18-2014, 01:49 PM
how to write corect a href links in ci? - by El Forum - 08-18-2014, 09:08 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.