views:

40

answers:

1

Hello all,

I am developing an embedded web server. Now, I have an access validation page (e.g. http://192.168.1.1/) at the very start that accepts username and password and validates it and later redirects the users to the actual device control web page (http://192.168.1.1/devicecontrol.html). I do not want the actual url to appear on the address bar. Instead the initial url should be retained so that users cannot directly visit this page and neither be able to bookmark this page....I understand this must be a common requirement but could not find any specific answers to this...any help / references would be hugely appreciated....Thanks in advance.

+2  A: 

That's not possible with Javascript alone. Use a Frameset (or if you're using Apache take a look at the mod_rewrite module).

One more advice: Don't do it! I would leave your site immediately, when I click around and the URL doesn't change. Looks like you're hiding something.

Henrik P. Hessel
I thought I had made it pretty clear in my question as to why I need to do this...its to disallow users to directly visit some pages that are confidential without logging in...
Saurabh Gandhi