how to mask a url address for a web site.

T

Thomas 'PointedEars' Lahn

srinivas said:
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
 
S

srinivas

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.
 
T

Thomas 'PointedEars' Lahn

srinivas said:
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
 
V

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,072
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top