Solved

Masked URL

Posted on 2012-03-14
9
292 Views
Last Modified: 2013-11-19
I have an 8 page website with no open links back to the root directory.  I want to create a URL mask that will display a substitute URL on all 8 pages>
I need the script that will work with most or all browsers and I need to know precisely where to place the script in each page.
0
Comment
Question by:doncalarco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 20

Expert Comment

by:edster9999
ID: 37722108
You just need a bit of javascript code which overwrites the address bar.
The only problem is if someone has java script disabled they will see it - but most people have JS turned on.

http://www.google.com/search?q=javascript+to+overwrite+address+bar
0
 

Author Comment

by:doncalarco
ID: 37722139
Thanks but you did not answer my question.  Instead you send me to search for an answser.
0
 

Author Comment

by:doncalarco
ID: 37722280
To be clear....I want to place a link to X.com URL on a web page named y.com
When the visitor clicks on the link in Y.com and lands on X.com, the URL displayed in the address bar will be Y.com, and all the pages on the 8-page website (X.com) will also display y.com as the URL...a mask!  Not a Short URL!  I don't ever want a visitor top see the url for X.com.

Please help.

Thanks
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37723087
That kind of masking is better achieved at the server level using rewrites or domain mirroring.  Iframes are also a better choice than a script.

Is there a reason it has to be a script?
0
 

Author Comment

by:doncalarco
ID: 37723241
Not at all!  It does not need to be a script.  I need someone to talk to me in laymens (newbie) terms, and just tell me what to do to make it happen.  The easiest way possible, would be best.

Thanks
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37723450
The absolutely easiest way is to use an Iframe tag to pull in the content from the other site and display it on a page in your site.

The syntax is:

<iframe src="http://www.google.com" height="600" width="800"></iframe>

Place that in the page wherever you want it to appear and adjust the parameters as you see fit.

One has to wonder though...why are you trying to deceive your users?
0
 

Author Comment

by:doncalarco
ID: 37724367
It is not a deception.
It is a corporate policy.  I have created a site to promote an incentive destination for my client's national sales force.  The client is very security conscious and they do not allow "links" to other sites on their corporate site, unless that are masked, mirrored, or whatever to only show their corporate URL.  Why?  I don't know?  Just a policy that they expect me to follow.
But it sure does not sound easy.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37726229
0
 
LVL 20

Accepted Solution

by:
edster9999 earned 500 total points
ID: 37726764
Well as above - use java script.  This is code that sits inside the page and changes the address people see to the one you want them to see.

When you have the links on the page and people hover over them - they will see where they are going.
Your current link would be something like :
<a href='http://www.othersite.com/page.htm'>See details</a>

You can mask that with code like this :

<a href="#" onclick="javascript:GetResource('http://www.othersite.com/page.htm')">See details</a>

Then when they click on the link and end up at that site you can use java script (or iFrames as mentioned by jason1178) to hide the site they are on.  As above google it.  You'll find PAGES and PAGES on the subject.  There seems little point in me googling it and copying and pasting someone elses code when you can google it, pick your own code and have your answer in seconds.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
help thx 6 34
Scripting 4 33
Natural height and jquery 6 40
what does http://website.whatever/robots.txt do and what it means? 3 46
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question