After a successful authentication I send the user to the home page by calling header
if($success) {
header('Location: home.php');
exit();
}
Ulitimatley I’d like to use a hashtag as part of the URL so for instance the URL to the user would look like this:
mysite/#!home
Can I do something like this or is there a better way to redirect them to the home page after a successful login?
That sort of hash tag is usually used with what is called, “addressing” or “deep linking”, a type of javascript page navagation. What you want is URL Rewriting, which allows you to do things like http://www.website.com/home
Deep Linking : http://www.asual.com/jquery/address/
Url rewrite: http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html