469,579 Members | 1,112 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

how to mask a url address for a web site.

Hi,

how to mask a url address for a web site.

Thanks,
Srinivas

Oct 22 '05 #1
7 39668
VK

srinivas wrote:
how to mask a url address for a web site.


What do you mean by that? Check if URL fits to some pattern template?

Oct 22 '05 #2
srinivas wrote:
how to mask a url address for a web site.


Perhaps you are looking for something like

var esc = (typeof encodeURIComponent == "function"
? encodeURIComponent
: (typeof escape == "function"
? escape
: function(x) { return x; }));

alert(esc("http://foo.bar/baz"));
PointedEars
Oct 22 '05 #3
is it possible to "mask" a URL address?

The customer hosts the actual site (decc.com). The URL's they want
to use would list as follows:

www.decc.com/abcd

www.decc.com/blablabla

www.decc.com/someword

What we want to do is have the user type in the url listed (I made them
up) and have decc re-direct to our web pages.

the customer wants the url to show up on the address bar on Srini end
as listed above

Essentially we are mis-stating the url the user is actually on.
Obviously the user would be on a Srini address at the time they are on
the web landing page BUT the question is whether or not we can spoof
the address to show the url the user originally entered.

Oct 22 '05 #4
srinivas wrote:
is it possible to "mask" a URL address?

The customer hosts the actual site (decc.com). The URL's they want
to use would list as follows:

www.decc.com/abcd

www.decc.com/blablabla

www.decc.com/someword

What we want to do is have the user type in the url listed
(I made them up) and have decc re-direct to our web pages.


There are two possible ways I can think of:

1. Use a redirection frameset. It introduces several
disadvantages and is therefore strongly discouraged.

2. Do the redirection server-side, best using URL rewriting:
<http://httpd.apache.org/docs/2.0/misc/rewriteguide.html>

None of this has to do with programming JavaScript at all.
PointedEars
Oct 22 '05 #5
hai Thomas 'PointedEars' Lahn

thanks for responding to my message

What i need is if i enter www.google.com in the addressbar,then the
site should redirects to www.gmail.com/index.aspx page but we can see
www.google.com in the url address bar.

Thanks

Oct 24 '05 #6
srinivas wrote:
What i need is if i enter www.google.com in the addressbar,then the
site should redirects to www.gmail.com/index.aspx page but we can see
www.google.com in the url address bar.


Yes, both of my suggestions are applicable to achieve
this (if you're the owner of google.com, of course ;-)).
HTH

PointedEars
Oct 24 '05 #7
VK
> how to mask a url address for a web site.

As I'm currently in anti-IE mood for some reason :-), here's an IE-only
trick (FF is smart/secure enough for equivalents).
<html>
<head>
<title>URL Spuffing</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script language="JScript">
function spuffURL() {
var fakeBar = window.createPopup();
fakeBar.document.body.innerHTML =
'<span style="font: 8pt MS Sans Serif, sans-serif">' +
'http://www.google.com</span>';
fakeBar.show(70,-20,300,16,document.body);
/* Of course the exact coords will vary greatly
depending on installed Explorer bars and screen resolution.
So it's a jeux d'esprit rather then an actual hack. */
}
window.onload = spuffURL;
</script>
</head>

<body bgcolor="#FFFFFF">
</body>
</html>

Oct 25 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by RiGGa | last post: by
reply views Thread by Chandrashekar Tippur | last post: by
7 posts views Thread by F. Michael Miller | last post: by
2 posts views Thread by Tai | last post: by
7 posts views Thread by Marcelo | last post: by
2 posts views Thread by nussu | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.