Hey everyone,

I'm having a trouble with the navigation bar when redirecting users to other pages. For example, if a user logs in, then they will be redirected to the main page (mysite/index.php) but the url displays as mysite/login.php which is the pure PHP script that doesn't contain any HTML lines in it. I guess that is fine, but the nav bar on the main page disappears unless I refresh the page to get it back.

I hope to hear from someone here. cheers

5 Years
Discussion Span
Last Post by rotten69

redirected to the main page (mysite/index.php) but the url displays as mysite/login.php

So, I know more about asp.net than PHP, but it doesnt sound like the client is an actually being redirected. It appears that the web server is just providing the client with the contents of index.php in its response to the login process. The equivalent in asp.net is server.transfer().


it is to do with jQuery framework. In php, we have header('Location:yoursite') which I assume does similar thing to server.transfer()..


I solved it. For anyone who is having the same problem, this line needs to be added data-ajax="false" to anchor tags. So you'd end up having a similar line to this

<a href="index.php" rel="external" data-ajax="false"> home </a>

I hope this thread helps you if you're reading it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.