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 6714367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:29:16+00:00 2026-05-26T08:29:16+00:00

I have a website hosted on IIS7 and i would like to impliment url

  • 0

I have a website hosted on IIS7 and i would like to impliment url rewriting on it

My current URL blog.mysite.com/article.aspx?name=marriage

I want to rewrite it to

blog.mysite.com/marriage

I tried some rules but nothing giving the perfect solution.

Please share your ideas and would be helpful for me

thank you all

shibin

  • 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-05-26T08:29:17+00:00Added an answer on May 26, 2026 at 8:29 am

    Assuming you are using Microsoft Rewrite 2.0 then your pattern would be:

    ^([^/]+)/?$

    And your rewrite URL would be:

    article.aspx?name={R:1}

    To just simple redirect from the new url scheme to the old put this in the system.webserver section of your web.config:

    <rewrite>
      <rules>
        <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
          <match url="^([^/]+)/?$" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="article.aspx?name={R:1}" />
        </rule>
      </rules>
    </rewrite>
    

    To also do redirects from the old to the new url, so the old urls will automatically update to the new scheme, and to include processing which will rewrite your html output to use the new url scheme you can replace the above with:

    <rewrite>
      <rules>
        <rule name="RedirectUserFriendlyURL1" stopProcessing="true">
          <match url="^article\.aspx$" />
          <conditions>
            <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
            <add input="{QUERY_STRING}" pattern="^name=([^=&amp;]+)$" />
          </conditions>
          <action type="Redirect" url="{C:1}" appendQueryString="false" />
        </rule>
        <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
          <match url="^([^/]+)/?$" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          </conditions>
          <action type="Rewrite" url="article.aspx?name={R:1}" />
        </rule>
      </rules>
      <outboundRules>
        <rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1">
          <match filterByTags="A, Form, Img" pattern="^(.*/)article\.aspx\?name=([^=&amp;]+)$" />
          <action type="Rewrite" value="{R:1}{R:2}/" />
        </rule>
        <preConditions>
          <preCondition name="ResponseIsHtml1">
            <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
          </preCondition>
        </preConditions>
      </outboundRules>
    </rewrite>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a website hosted at the url: http://www.mysite.com/ Say this is hosted
Damn you modrewrite I have a website hosted at a url like: http://mydomain/mocks/thesite/ Now
i have a website that is being hosted on www.webhost4life.com. Its a basic asp.net
I have a wordpress website (self hosted blog), but now I need to create
I have a website hosted on Windows Azure Cloud. In one of the aspx
Say I have a website and a database of that website hosted locally on
I have a internal website hosted on IIS. I added the following meta code
I currently have an asp.net website hosted on two web servers that sit behind
I have an ASP.Net hosted website which displays a list of results as a
I have coded up an ASP.NET website and running on win'08 (remotely hosted). The

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.