Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8314467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:49:40+00:00 2026-06-08T20:49:40+00:00

I have a problem in my web forms ASP.NET app where I would like

  • 0

I have a problem in my web forms ASP.NET app where I would like to rewrite a url from

http://example.com/abcd

into

http://example.com/page.aspx?id=abcd

  • the abcd part will be unique and I cant create a folder for it
  • I want the users to always see the http://example.com/abcd url
  • would the solution be the same in Windows Azure?

Can somebody please help me with some hints?

Thank You!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T20:49:42+00:00Added an answer on June 8, 2026 at 8:49 pm

    In your web.config, in the system.webServer section put something like this:

    <!-- This has been added to support url rewriting for ... -->
    <rewrite>
      <rules>
        <rule name="RedirectUserFriendlyURL1" stopProcessing="true">
          <match url="^Page\.aspx$" />
          <conditions>
            <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
            <add input="{QUERY_STRING}" pattern="^id=([a-zA-Z]+)$" />
          </conditions>
          <action type="Redirect" url="{C:1}" appendQueryString="false" />
        </rule>
        <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
          <match url="^([a-zA-Z]+)$" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="Page.aspx?id={R:1}" />
        </rule>
      </rules>
    </rewrite>
    

    Please note that I have copied from the config we have in a production site and modified a little bit… needs testing.

    The config should work when you have only words ([a-zA-Z]+), change the pattern to make it work for numbers.

    hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET web forms app with a button on it. This button
I have the following problem: republishing ASP.NET web app causes (as expected) session resetting
I have a ASP.NET Web Forms application that internally makes many SOAP and REST
I'm trying to develop my first site in ASP.Net using Web Forms. I have
I'm using forms authentication on a very small ASP.NET web app (Web Forms) in
I have an ASP.NET MVC 3 application with the following web.config settings. <authentication mode=Forms>
I am required to learn asp.net web services with web forms. I have a
I have an ASP.net webforms app that connects to a web service, All the
So I'm getting some problem similar to this: ttp://stackoverflow.com/questions/3694475/asp-net-forms-authentication-authenticates-in-localhost-server-but-not-on-the-w but I'm using MVC 3.0
I have made a Azure web app that has a ASP.NET web that also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.