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

  • SEARCH
  • Home
  • 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 7902077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:24:11+00:00 2026-06-03T09:24:11+00:00

IIS on Windows Server 2008 R2. I have the following (which was generated by

  • 0

IIS on Windows Server 2008 R2.

I have the following (which was generated by URL rewrite 2.0):

<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="?p={R:1}" appendQueryString="true" logRewrittenUrl="true" />

I thought it would cause

http://localhost/56321

to be interperated as:

http://localhost/?p=56321

Can anyone see what it wrong? It just gives a 404 error.

I have also tried a url redirect rule and that works fine so I know the module is working.

  • 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-03T09:24:12+00:00Added an answer on June 3, 2026 at 9:24 am

    Your solution is correct but the regular expression to which you match the URL should not start with a slash. The following works:

    <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="?p={R:1}" appendQueryString="true" logRewrittenUrl="true" />
    </rule>
    

    Hope this helps.

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

Sidebar

Related Questions

I have a Windows 2008 Server with IIS 7 which using a .NET C#
I have a really irritating problem with PHP on Windows Server 2008 R2. IIS
i have an application which gets random session timeouts. (IIS 7.5 on Windows 2008
We have an Windows 2008 server with IIS 7 to test sites we develop
I have a Virtual Machine running the following: Windows Server 2008 SharePoint 2007 SP1
I am using IIS 7.0 + Windows Server 2008 x64. I have installed .NET
I have an ASP.NET application running on a Windows Server 2008 box with IIS
I have deployed my application on IIS 7.5 on windows server 2008 operating system
I have an ASP.NET 2.0 web site hosted on Windows Server 2008 with IIS
I have deployed my ASP.NET web application on IIS (windows 2008 server). I have

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.