0

I am trying to rewrite the URL through "Using URL Rewrite Module" on IIS7 (windows 7).

URL: http://localhost/AIM/group-discussion/videos.aspx?id=4&title=some-title

Rewrite URL: http://localhost/AIM/group-discussion/videos/4/some-title

Rewrite rule:

<rewrite>
            <rules>
                <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                    <match url="^AIM/group-discussion/videos/([^/]+)/([^/]+)/?$" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="AIM/group-discussion/videos.aspx?id={R:1}&amp;title={R:2}" />
                </rule>
            </rules>
        </rewrite>

I am getting 404 error while accessing rewrite URL (http://localhost/AIM/group-discussion/videos/4/some-title)

following error log through "Failed request tracing" in IIS7

MODULE_SET_RESPONSE_ERROR_STATUS

ModuleName="IIS Web Core", Notification="MAP_REQUEST_HANDLER", HttpStatus="404", HttpReason="Not Found", HttpSubStatus="0", ErrorCode="The system cannot find the file specified.
 (0x80070002)", ConfigExceptionInfo=""

I am running site in "Integrated Pipe mode"

  • If you access the destination URL directly, what happens? – Broam Dec 14 '10 at 17:52
1

Try using process monitor from www.sysinternals.com. That will let you know what it's attempting to do on disk. Possibly you just need a / at the beginning of your rewrite path.

If it doesn't show attempting to do anything on disk then try Failed Request Tracing. That will provide even further details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy