Help - Search - Members - Calendar
Full Version: How To Mask Url?
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > HTML and CSS
susa007
I want to mask the URL displayed on the ADDRESS BAR how can I do like that? Say.. I want to redirect the domain name ABC.COM to say XYZ.COM but I want to show the URL ABC.COM on the ADDRESS BAR instead of XYZ.COM. Plase help me...
MrTouz
well, if both the domain are yours you just have to redirect the XYZ.COM to ABC.COM.

So if someone types xyz.com he will be forced to go to abc.com, you can do that with a code or sometimes by your domain control panel.

CODE
<META http-equiv="refresh" content="1;URL=http://abc.com">


You can even set the time, you can aslo use Javascript but if they disabled it... they wont be redirected, i think it can be done via htaccess too but i dunno how.

Than there is an other technique using an iframe and that is if you do not own the website.
You add an iframe :

CODE
<iframe src="http:www.abc.com" width="100%" height="100%" mane="what ever"></iframe>


So once you are on the xyz.com site it will set an iframe with the abc.com content in it. Problem is no urls will work your url will always stay xyz.com. Plus if you want to iframe a site... probably means that you do not own it so the author would mind i think !

IamShipon1988
When it comes to iframe, it is a pain in the but. I would recommend you go with the Meta tag, but if you want to continue with iframe, you can do what Mr. T did or try the following
CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
  <title>Web-site Title Here</title>
  <META name="description" content="Put your description here">
  <META name="keywords" content="keywords go here, separated by a comma,">
</head>
<frameset rows="100%,*" border="0">
  <frame src="http://yourlinkhere.com/location_of_page" frameborder="0" />
  <frame frameborder="0" noresize />
</frameset>

<!-- pageok -->
<!-- 01 -->
<!-- 5.1-->
</html>


This code will help kill some bugs you may discover with few browsers.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.