Reputation: 742
I have a form in which the action is SiteController/actionLogin
. If the user submits and doesn't get logged in, the URL changes to http://localhost/MySite/SiteController/actionLogin
and another attempt will be like this
http://localhost/MySite/SiteController/SiteController/actionLogin
How can this be fixed?
I am using CodeIgniter PHP framework.
Upvotes: 2
Views: 6653
Reputation: 25776
Use site_url('SiteController/actionLogin')
to echo your url. Here is the documentation.
Upvotes: 0
Reputation: 16510
Put a /
in front of the form action to tell the browser that it's an absolute URL:
action="/SiteController/actionLogin"
Upvotes: 1