2

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.

2 Answers 2

1

Put a / in front of the form action to tell the browser that it's an absolute URL:

action="/SiteController/actionLogin" 
Sign up to request clarification or add additional context in comments.

Comments

0

Use site_url('SiteController/actionLogin') to echo your url. Here is the documentation.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.