Hide/Mask URL in default homepage - Please help!

Discussion in 'ASP .Net' started by daniel, Feb 5, 2009.

  1. daniel

    daniel Guest

    I'm currently in the process of modifying my site's URL to hide the
    redirect path.
    My objective here is that i want to mask my redirect url so that only
    my domain would only appear in the URL/Address bar so when you tried
    to navigate to my default homepage, the redirect path will not be
    visible. Can anyone guide me how can i accomplish my goal?

    Illustration:
    From:
    http://www.mysite.com/home/default.html

    To:
    http://www.mysite.com

    here is my asp code:
    <%@ Language=VBScript %>
    <%
    Response.Redirect "/home/default.html"
    %>

    I used the asp page in my default page content in the IIS. I tried
    also server.transfer("/home/default.html") in aspx as my default page
    content but a consistent error is being thrown - "Error executing
    child request for home/default.html".

    Note also that frames will not fit my needs since this method will
    cover all the folders in my site and i dont want to do that, i would
    just likt to implement this in my default home page URL.

    FYI: I used IIS6.0

    Thank in advance!
     
    daniel, Feb 5, 2009
    #1
    1. Advertising

  2. If this was another ASPX page, you could easily use Server.Transfer. You
    cannot do this with HTML, however, as Patrice has stated.

    One way to mask redirects is to do it in a frameset. This will mask all
    pages. The issue here is a person can still find out if they so desire. Of
    course, this is something you cannot get around no matter how hard you try,
    as the browser knows. It makes it harder, however.

    Some have asked about changing the URL in the address bar, but it is not
    exposed. This is on purpose. You will notice the hack sites place a graphic
    over the address bar, but it only works when the address bar is in the exact
    position they are placing the graphic. Not a wise direction anyway, as
    people think HACKER.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Blog:
    http://feeds.feedburner.com/GregoryBeamer

    ********************************************
    | Think outside the box! |
    ********************************************
    "daniel" <> wrote in message
    news:...
    > I'm currently in the process of modifying my site's URL to hide the
    > redirect path.
    > My objective here is that i want to mask my redirect url so that only
    > my domain would only appear in the URL/Address bar so when you tried
    > to navigate to my default homepage, the redirect path will not be
    > visible. Can anyone guide me how can i accomplish my goal?
    >
    > Illustration:
    > From:
    > http://www.mysite.com/home/default.html
    >
    > To:
    > http://www.mysite.com
    >
    > here is my asp code:
    > <%@ Language=VBScript %>
    > <%
    > Response.Redirect "/home/default.html"
    > %>
    >
    > I used the asp page in my default page content in the IIS. I tried
    > also server.transfer("/home/default.html") in aspx as my default page
    > content but a consistent error is being thrown - "Error executing
    > child request for home/default.html".
    >
    > Note also that frames will not fit my needs since this method will
    > cover all the folders in my site and i dont want to do that, i would
    > just likt to implement this in my default home page URL.
    >
    > FYI: I used IIS6.0
    >
    > Thank in advance!
    >
     
    Cowboy \(Gregory A Beamer\), Feb 5, 2009
    #2
    1. Advertising

  3. daniel

    daniel Guest

    On Feb 5, 4:47 pm, "Patrice" <http://www.chez.com/scribe/> wrote:
    > This is likely because you can't transfer to an HTML page. Change your home
    > to an ASPX page and you should be fine...
    >
    > (if the home page is default.html under your root site you would have
    > nothing to do).
    >
    > --
    > Patrice
    >
    > "daniel" <> a écrit dans le message de
    > groupe de discussion :
    > ...
    >
    >
    >
    > > I'm currently in the process of modifying my site's URL to hide the
    > > redirect path.
    > > My objective here is that i want to mask my redirect url so that only
    > > my domain would only appear in the URL/Address bar so when you tried
    > > to navigate to my default homepage, the redirect path will not be
    > > visible. Can anyone guide me how can i accomplish my goal?

    >
    > > Illustration:
    > > From:
    > >http://www.mysite.com/home/default.html

    >
    > > To:
    > >http://www.mysite.com

    >
    > > here is my asp code:
    > > <%@ Language=VBScript %>
    > > <%
    > > Response.Redirect "/home/default.html"
    > > %>

    >
    > > I used the asp page in my default page content in the IIS. I tried
    > > also server.transfer("/home/default.html") in aspx as my default page
    > > content but a consistent error is being thrown - "Error executing
    > > child request for home/default.html".

    >
    > > Note also that frames will not fit my needs since this method will
    > > cover all the folders in my site and i dont want to do that, i would
    > > just likt to implement this in my default home page URL.

    >
    > > FYI: I used IIS6.0

    >
    > > Thank in advance!- Hide quoted text -

    >
    > - Show quoted text -


    hi Patrice,

    Thanks for your reply. I cannot make the /home/ channel my root
    directory because I am currently using MCMS technology. The system
    restricts me from creating a posting under the root domain itself, and
    even if i can make the /home/ channel my root directory, I think the
    posting name "default.htm" will still display in the address bar. This
    still doesnt solve my dillemma.

    I am currently using asp file as my default content file in the IIS,
    but this doesnt limit my modifications. I have also tried using html
    file, but still resulted to no avail. Can i use javascript (that will
    be embedded in the html) to mask the url? I dont want to go to the
    actual output url of the script, i would just like to mask it. Thanks
    in again.
     
    daniel, Feb 7, 2009
    #3
  4. daniel

    daniel Guest

    On Feb 5, 9:06 pm, "Cowboy \(Gregory A Beamer\)"
    <> wrote:
    > If this was another ASPX page, you could easily use Server.Transfer. You
    > cannot do this with HTML, however, as Patrice has stated.
    >
    > One way to mask redirects is to do it in a frameset. This will mask all
    > pages. The issue here is a person can still find out if they so desire. Of
    > course, this is something you cannot get around no matter how hard you try,
    > as the browser knows. It makes it harder, however.
    >
    > Some have asked about changing the URL in the address bar, but it is not
    > exposed. This is on purpose. You will notice the hack sites place a graphic
    > over the address bar, but it only works when the address bar is in the exact
    > position they are placing the graphic. Not a wise direction anyway, as
    > people think HACKER.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > Blog:http://feeds.feedburner.com/GregoryBeamer
    >
    > ********************************************
    > |    Think outside the box!                            |
    > ********************************************"daniel" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > I'm currently in the process of modifying my site's URL to hide the
    > > redirect path.
    > > My objective here is that i want to mask my redirect url so that only
    > > my domain would only appear in the URL/Address bar so when you tried
    > > to navigate to my default homepage, the redirect path will not be
    > > visible. Can anyone guide me how can i accomplish my goal?

    >
    > > Illustration:
    > > From:
    > >http://www.mysite.com/home/default.html

    >
    > > To:
    > >http://www.mysite.com

    >
    > > here is my asp code:
    > > <%@ Language=VBScript %>
    > > <%
    > > Response.Redirect "/home/default.html"
    > > %>

    >
    > > I used the asp page in my default page content in the IIS. I tried
    > > also server.transfer("/home/default.html") in aspx as my default page
    > > content but a consistent error is being thrown - "Error executing
    > > child request for home/default.html".

    >
    > > Note also that frames will not fit my needs since this method will
    > > cover all the folders in my site and i dont want to do that, i would
    > > just likt to implement this in my default home page URL.

    >
    > > FYI: I used IIS6.0

    >
    > > Thank in advance!- Hide quoted text -

    >
    > - Show quoted text -


    Hi Gregory,

    Thanks for your reply...I tried to use frames but this approach
    resulted to an entire site masking and I dont want to do that. I just
    want to mask my home page URL - one URL, and not the entire site. Is
    there an attribute/s that i need to add in the frames code that will
    resolve my problem - masking only one URL? I am trying to use
    javascript but still can't find the right approach to handle it, or is
    this event possible? Thanks again!
     
    daniel, Feb 7, 2009
    #4
  5. daniel

    woakesd

    Joined:
    Mar 8, 2010
    Messages:
    1
    Location:
    Edinburgh, Scotland
    Masking the home page

    There is a simple approach to acheive this, the exact approach depends on whether you are using IIS 6 or 7.

    I acheived this recently by using a custom error handler.

    When you implement the change you will be serving a 301 (permanent) redirect to a request for "/default.htm" which will take the requester to "/".

    If you send me a message I will send you a link to my recent blog post which will fill in all the details.
     
    woakesd, Mar 8, 2010
    #5
  6. daniel

    David Woakes Guest

    Mask URL in default homepage

    I put together a brief article on doing this on IIS6 and IIS7 recently.

    http://www.ancientgeek.co.uk/?p=122

    On IIS 7 you just need to change the default document and rename your homepage to .asp and check request.servervariables("URL") before deciding to redirect.

    IIS 6 is a little trickier as if the request is "/" it gives request.servervariables("URL") the value of the document serving the request (say "/default.asp").

    David



    daniel wrote:

    Hide/Mask URL in default homepage - Please help!
    06-Feb-09

    I'm currently in the process of modifying my site's URL to hide the
    redirect path.
    My objective here is that i want to mask my redirect url so that only
    my domain would only appear in the URL/Address bar so when you tried
    to navigate to my default homepage, the redirect path will not be
    visible. Can anyone guide me how can i accomplish my goal?

    Illustration:
    From:
    http://www.mysite.com/home/default.html

    To:
    http://www.mysite.com

    here is my asp code:
    <%@ Language=VBScript %>
    <%
    Response.Redirect "/home/default.html"
    %>

    I used the asp page in my default page content in the IIS. I tried
    also server.transfer("/home/default.html") in aspx as my default page
    content but a consistent error is being thrown - "Error executing
    child request for home/default.html".

    Note also that frames will not fit my needs since this method will
    cover all the folders in my site and i dont want to do that, i would
    just likt to implement this in my default home page URL.

    FYI: I used IIS6.0

    Thank in advance!

    Previous Posts In This Thread:

    On Thursday, February 05, 2009 3:47 AM
    Patrice wrote:

    This is likely because you can't transfer to an HTML page.
    This is likely because you can't transfer to an HTML page. Change your home
    to an ASPX page and you should be fine...

    (if the home page is default.html under your root site you would have
    nothing to do).

    --
    Patrice

    "daniel" <> a ?crit dans le message de
    groupe de discussion :
    ...

    On Thursday, February 05, 2009 8:06 AM
    Cowboy \(Gregory A Beamer\) wrote:

    If this was another ASPX page, you could easily use Server.Transfer.
    If this was another ASPX page, you could easily use Server.Transfer. You
    cannot do this with HTML, however, as Patrice has stated.

    One way to mask redirects is to do it in a frameset. This will mask all
    pages. The issue here is a person can still find out if they so desire. Of
    course, this is something you cannot get around no matter how hard you try,
    as the browser knows. It makes it harder, however.

    Some have asked about changing the URL in the address bar, but it is not
    exposed. This is on purpose. You will notice the hack sites place a graphic
    over the address bar, but it only works when the address bar is in the exact
    position they are placing the graphic. Not a wise direction anyway, as
    people think HACKER.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    Blog:
    http://feeds.feedburner.com/GregoryBeamer

    ********************************************
    ********************************************
    "daniel" <> wrote in message
    news:...

    On Friday, February 06, 2009 12:25 AM
    daniel wrote:

    Hide/Mask URL in default homepage - Please help!
    I'm currently in the process of modifying my site's URL to hide the
    redirect path.
    My objective here is that i want to mask my redirect url so that only
    my domain would only appear in the URL/Address bar so when you tried
    to navigate to my default homepage, the redirect path will not be
    visible. Can anyone guide me how can i accomplish my goal?

    Illustration:
    From:
    http://www.mysite.com/home/default.html

    To:
    http://www.mysite.com

    here is my asp code:
    <%@ Language=VBScript %>
    <%
    Response.Redirect "/home/default.html"
    %>

    I used the asp page in my default page content in the IIS. I tried
    also server.transfer("/home/default.html") in aspx as my default page
    content but a consistent error is being thrown - "Error executing
    child request for home/default.html".

    Note also that frames will not fit my needs since this method will
    cover all the folders in my site and i dont want to do that, i would
    just likt to implement this in my default home page URL.

    FYI: I used IIS6.0

    Thank in advance!

    On Saturday, February 07, 2009 10:53 PM
    daniel wrote:

    Re: Hide/Mask URL in default homepage - Please help!
    On Feb 5, 4:47=A0pm, "Patrice" <http://www.chez.com/scribe/> wrote:
    me
    e

    hi Patrice,

    Thanks for your reply. I cannot make the /home/ channel my root
    directory because I am currently using MCMS technology. The system
    restricts me from creating a posting under the root domain itself, and
    even if i can make the /home/ channel my root directory, I think the
    posting name "default.htm" will still display in the address bar. This
    still doesnt solve my dillemma.

    I am currently using asp file as my default content file in the IIS,
    but this doesnt limit my modifications. I have also tried using html
    file, but still resulted to no avail. Can i use javascript (that will
    be embedded in the html) to mask the url? I dont want to go to the
    actual output url of the script, i would just like to mask it. Thanks
    in again.

    On Saturday, February 07, 2009 10:53 PM
    daniel wrote:

    Re: Hide/Mask URL in default homepage - Please help!
    On Feb 5, 9:06=A0pm, "Cowboy \(Gregory A Beamer\)"
    <> wrote:
    f
    y,
    ic
    act
    =A0 =A0 =A0 =A0|
    > wrote in message

    Hi Gregory,

    Thanks for your reply...I tried to use frames but this approach
    resulted to an entire site masking and I dont want to do that. I just
    want to mask my home page URL - one URL, and not the entire site. Is
    there an attribute/s that i need to add in the frames code that will
    resolve my problem - masking only one URL? I am trying to use
    javascript but still can't find the right approach to handle it, or is
    this event possible? Thanks again!


    Submitted via EggHeadCafe - Software Developer Portal of Choice
    Making Silverlight Emulate Synchronous Requests
    http://www.eggheadcafe.com/tutorial...1-c5c717c9b184/making-silverlight-emulat.aspx
     
    David Woakes, Mar 8, 2010
    #6
  7. daniel

    David Woakes Guest

    Article URL changed

    http://www.ancientgeek.co.uk/2010/03/06/mask-default-home-page-in-iis/



    David Woakes wrote:

    Mask URL in default homepage
    08-Mar-10

    I put together a brief article on doing this on IIS6 and IIS7 recently.

    http://www.ancientgeek.co.uk/?p=122

    On IIS 7 you just need to change the default document and rename your homepage to .asp and check request.servervariables("URL") before deciding to redirect.

    IIS 6 is a little trickier as if the request is "/" it gives request.servervariables("URL") the value of the document serving the request (say "/default.asp").

    David

    Previous Posts In This Thread:

    On Thursday, February 05, 2009 3:47 AM
    Patrice wrote:

    This is likely because you can't transfer to an HTML page.
    This is likely because you can't transfer to an HTML page. Change your home
    to an ASPX page and you should be fine..

    (if the home page is default.html under your root site you would have
    nothing to do)

    -
    Patric

    "daniel" <> a ?crit dans le message de
    groupe de discussion :
    ...

    On Thursday, February 05, 2009 8:06 AM
    Cowboy \(Gregory A Beamer\) wrote:

    If this was another ASPX page, you could easily use Server.Transfer.
    If this was another ASPX page, you could easily use Server.Transfer. You
    cannot do this with HTML, however, as Patrice has stated

    One way to mask redirects is to do it in a frameset. This will mask all
    pages. The issue here is a person can still find out if they so desire. Of
    course, this is something you cannot get around no matter how hard you try,
    as the browser knows. It makes it harder, however

    Some have asked about changing the URL in the address bar, but it is not
    exposed. This is on purpose. You will notice the hack sites place a graphic
    over the address bar, but it only works when the address bar is in the exact
    position they are placing the graphic. Not a wise direction anyway, as
    people think HACKER

    --
    Gregory A. Beame
    MVP; MCP: +I, SE, SD, DB

    Blog
    http://feeds.feedburner.com/GregoryBeame

    *******************************************
    *******************************************
    "daniel" <> wrote in message
    news:...

    On Friday, February 06, 2009 12:25 AM
    daniel wrote:

    Hide/Mask URL in default homepage - Please help!
    I'm currently in the process of modifying my site's URL to hide th
    redirect path
    My objective here is that i want to mask my redirect url so that onl
    my domain would only appear in the URL/Address bar so when you trie
    to navigate to my default homepage, the redirect path will not b
    visible. Can anyone guide me how can i accomplish my goal

    Illustration
    From
    http://www.mysite.com/home/default.htm

    To
    http://www.mysite.co

    here is my asp code
    <%@ Language=VBScript %
    <
    Response.Redirect "/home/default.html
    %

    I used the asp page in my default page content in the IIS. I trie
    also server.transfer("/home/default.html") in aspx as my default pag
    content but a consistent error is being thrown - "Error executin
    child request for home/default.html"

    Note also that frames will not fit my needs since this method wil
    cover all the folders in my site and i dont want to do that, i woul
    just likt to implement this in my default home page URL

    FYI: I used IIS6.

    Thank in advance!

    On Saturday, February 07, 2009 10:53 PM
    daniel wrote:

    Re: Hide/Mask URL in default homepage - Please help!
    On Feb 5, 4:47=A0pm, "Patrice" <http://www.chez.com/scribe/> wrote
    m


    hi Patrice

    Thanks for your reply. I cannot make the /home/ channel my roo
    directory because I am currently using MCMS technology. The syste
    restricts me from creating a posting under the root domain itself, an
    even if i can make the /home/ channel my root directory, I think th
    posting name "default.htm" will still display in the address bar. Thi
    still doesnt solve my dillemma

    I am currently using asp file as my default content file in the IIS
    but this doesnt limit my modifications. I have also tried using html
    file, but still resulted to no avail. Can i use javascript (that will
    be embedded in the html) to mask the url? I dont want to go to the
    actual output url of the script, i would just like to mask it. Thanks
    in again.

    On Saturday, February 07, 2009 10:53 PM
    daniel wrote:

    Re: Hide/Mask URL in default homepage - Please help!
    On Feb 5, 9:06=A0pm, "Cowboy \(Gregory A Beamer\)"
    <> wrote:
    f
    y,
    ic
    act
    =A0 =A0 =A0 =A0|
    > wrote in message

    Hi Gregory,

    Thanks for your reply...I tried to use frames but this approach
    resulted to an entire site masking and I dont want to do that. I just
    want to mask my home page URL - one URL, and not the entire site. Is
    there an attribute/s that i need to add in the frames code that will
    resolve my problem - masking only one URL? I am trying to use
    javascript but still can't find the right approach to handle it, or is
    this event possible? Thanks again!

    On Monday, March 08, 2010 12:55 PM
    David Woakes wrote:

    Mask URL in default homepage
    I put together a brief article on doing this on IIS6 and IIS7 recently.

    http://www.ancientgeek.co.uk/?p=122

    On IIS 7 you just need to change the default document and rename your homepage to .asp and check request.servervariables("URL") before deciding to redirect.

    IIS 6 is a little trickier as if the request is "/" it gives request.servervariables("URL") the value of the document serving the request (say "/default.asp").

    David


    Submitted via EggHeadCafe - Software Developer Portal of Choice
    Measuring SharePoint Page Rendering
    http://www.eggheadcafe.com/tutorial...1-9d5f236c2be5/measuring-sharepoint-page.aspx
     
    David Woakes, Mar 23, 2010
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Robert Kattke
    Replies:
    1
    Views:
    1,376
    Bryce
    Sep 14, 2004
  2. guenther schoebel
    Replies:
    2
    Views:
    6,552
    Eric Cartman
    Oct 10, 2003
  3. Marcin Tyman

    Conversion mask in hex to bit mask

    Marcin Tyman, May 6, 2008, in forum: Ruby
    Replies:
    4
    Views:
    891
    Robert Klemme
    May 6, 2008
  4. 187
    Replies:
    2
    Views:
    621
    Bart Lateur
    Jul 29, 2004
  5. madhur
    Replies:
    0
    Views:
    129
    madhur
    Jun 13, 2007
Loading...

Share This Page