CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    220

    is it possible (URLs related question)

    Hi

    Lets say I have my website setup at www.abc.com. When some user browses the site, he comes accross some webforms having such URL www.abc.com/dir1/pages/page.aspx?id=4. Now what I want is that the URL visible in browser, for the above page, should be something like
    www.abc.com/dir1/page.aspx?id=4.

    How to accomplish this.

  2. #2
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: is it possible (URLs related question)

    It is possible with "URL Rewriting" or "Friendly Urls" (name varries depending on who you talk to / read)
    It is a diffuclt topic to explain easily in a post like this - although essentially the technique is quite simple - so I'd suggest you try and Google url rewrite http module.

    But basically - what often is done is you develop a "http module" (basically a class library) which you attach to the website. That module will be hit on incoming requests and read the (external) url and map it and rewrite it to a another (internal) url.
    So your users will see one url, but the system internally will see another.

  3. #3
    Join Date
    Apr 2006
    Posts
    220

    Re: is it possible (URLs related question)

    Thank you for your time. by they way I implemented the technique just after posting this question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured