-1

how the url masking is done through html and javascript? I have the address like https://stackoverflow.com/ then how that address redirect to https://stackoverflow.com/question/ask.

Community
  • 1
  • 1
user
  • 1
  • 4
  • As we are having that tiny url link generator.How provide the small link that link point to the particular link and by pasting that small link in the address bar it redirect to the that link only – user Mar 10 '14 at 06:49
  • 1
    Er… pardon? / doesn’t redirect to /question/ask on Stack Overflow. – Ry- Mar 10 '14 at 06:50
  • I have given the example that by given small url only it redirect to the long url or that main url the user does not have to remember the full url – user Mar 10 '14 at 06:54
  • Are you asking about PHP URL rewriting or something? – Ry- Mar 10 '14 at 06:57
  • I want the URL MASKING in the html or javascript – user Mar 10 '14 at 07:12
  • See, using the same terminology as in your question isn’t helping me. Could you explain it in other words, please? – Ry- Mar 10 '14 at 07:39
  • as we type the google.com and it expand into the https://www.google.co.in/?gfe_rd=ctrl&ei=0LweU4ezM8mfiAfzk4DAAg&gws_rd=cr – user Mar 11 '14 at 07:39
  • as the user will only have to member the small link like facebook,google and it will redirect to the page....how we can expand our url link and it will direct to the main link – user Mar 11 '14 at 07:41

1 Answers1

0

You can display a link that goes to another like so:

<a href="http://stackoverflow.com/question/ask">http://stackoverflow.com/</a>

This will look like: http://stackoverflow.com on the page while actually directing to the longer one.

robotcookies
  • 1,059
  • 9
  • 13
  • But it will not work on pasting the link http://stackoverflow.com in the addressbar and redirect to that paricular link or the main link – user Mar 10 '14 at 07:09
  • Thanks..But it will work for the link or that anchor tag only and not pasting that link in the address bar and redirect to the that paricular link – user Mar 10 '14 at 07:16
  • If you are asking that the actual address the user is being sent to won't show in the address bar, then no. I don't think you can do that. – robotcookies Mar 10 '14 at 07:18
  • as the user only have to know the small link like facebook,google and that go to the original link and the user don't have to know the whole link – user Mar 10 '14 at 07:33
  • as in the post and get method the url expand – user Mar 10 '14 at 07:35
  • I dont want to hide the address... as i just type facebook in the address bar and that redirect to the main link and we donot have to know the whole link,the address length get full or expand – user Mar 10 '14 at 07:37
  • Do you mean a redirect? Try: http://stackoverflow.com/questions/503093/how-can-i-make-a-redirect-page-in-jquery-javascript – robotcookies Mar 10 '14 at 07:40
  • as we type the google.com and it expand into the https://www.google.co.in/?gfe_rd=ctrl&ei=0LweU4ezM8mfiAfzk4DAAg&gws_rd=cr – user Mar 11 '14 at 07:38