Hide actual url in address-bar using iframe
- Wednesday, April 9, 2008, 16:38
- how-to, tips and technique, tutorial
- 10 comments
Do you want to hide the actual URL in the address-bar? Do you want to display the same url throughout the website? Then here is the tips for you do the same in your website. Just display the same URL i.e http://www.your-site.com throughout your website in address bar, no matter if you in the page http://www.your-site.com/aboutus.html.
As you can see demo, it displays the same url throughout the browser’s address bar.But you are navigating to different page like aboutus.html or services.html. Ok, too much explanation, now let’s know how to do it.
1) First of create, all the other relavant page like “services.html” or “contactus.html” as usual.
2) For home page, rename the actual index page like “index.html” or “index.php” as “home.html” or “home.php” or whatever name you’re comfortable with.
3)Now, in the index page like “index.html” or “index.php”, put the following code
<iframe src="home.html" width="100%" height="100%" frameborder="0" scrolling="no" />
As, you can see above, we’ve used iframe to display the “home.html” page in the home page by using “src” attribute. The width and height should be “100%” and border should be ” ” for hiding the actual URL from the browser and displaying it so normal.
When a new link is clicked in the page, it gets loaded within “iframe” and displays the same URL throughout the website.
Popularity: 13% [?]
Related Posts
» Animated content navigation effect using jquery
» Custom Error Page with .htaccess
» 5 useful url rewriting examples using .htaccess
» How to hide actual URL in the status bar of all browsers?

There is also somtehtigs like mode-rewrite to apache that can do similiar thing.
But is there any reason in doing so ? For me it’s like making white text over yellow background.
Well P4trykx, I respect your thought but I got around 10 emails through my contact form asking this technique to display domain name in url always. Furthermore, you are not suggested to use this technique from the SEO point of view.
BTW I don’t think mod_rewrite can do the same thing i.e. display same url throughout the site. If you think mod_rewrite can do this then show me a example otherwise it’s very hard to believe me this…
I have a website ( as you can see) and if you look at the page you can see a logi script. (which is being upgraded to a more secure one soon). When you enter the correct details you are directed to another page. That is why i need a way to hide the contents of the address bar, security. Is there any other way of doing this than frameset?
Thankyou, Daniel Curzon
For that you can post the values or you can put these values in session to hide the content in the address bar..
this is a good trick to hide the url.
Thanks
can’t see the code above the following code
The code hides the URL when you click on the link, but not when you put the mouse on the link. Give it a try and put the mouse on one of the link and you will see the URL changing on status bar.
ya true…..you can see the actual URL in the status bar ….for that you can look at this post…
http://roshanbh.com.np/2008/08/different-status-bar-text-hyperlink-mouseover.html
Suppose i have a link http://www.website1.com/xyz , if user clicks on this link i want to display in address bar as http://www.website2.com/xyz .. Is it possible ?
Thanks for the help !
Guys, I need your help. I have some people working on a website. Now I dont want the to know the URL of that website in the address bar, and also dont want them to navigate to any other page. So I dont have any solution for that.
What i think is to keep that webpage on the homepage of the web browser and than delete the navigation tool bar completely. Can I do that? Or do you have anyother solution for my problem. Please replay soon.