views:

127

answers:

2

Hi,

I am having a bit of an issue with the way CI is dealing with /.

In a regular form i notice that the following form action didn't work action="mydomain.com/ci-controller/login/" but this one does work action="mydomain.com/ci-controller/login"

Strange but he it worked. But now i need this from a iframe, i the iframe i have a login form which sets the parents url to mydomain.com/ci-controller/login, but i get the same error as it was calling mydomain.com/ci-controller/login/

Could my problem be that the call from the iframe adds a trailing / which is not visible??

Any thoughts

+1  A: 

Don't use a trailing slash, it will add a segment with an empty string.

Phil Sturgeon
well i haven't add a trailing slash in the form action like so`action="javascript:parent.parent_go_url('mydomain.com/ci-controller/login');"`but still the login doesn't work. The broswer url goes to the right url and all. Like i said if i am using thismydomain.com/ci-controller/login on a regular form in the page it works but not from a form.This drives me nuts
alex
A: 

Why don't you just post to the parent?

In the iframe view:

<form action="http://localhost:8888/index.php/test1/post" target="_parent" method="POST">
  <input type="text" name="test_form" />
  <input type="submit" value="go" />
</form>

This form in an iframe on my little tester here worked correctly

stormdrain