0

Hi I've configured a rewrite rule on my IIS but it seems like it never gets fired I've been working on this for several hours without any luck this is my rule:

my URL is the following:

http://localhost:2934/trabajos/3ba2a9e4/some-cool-title ' and I want ro rewrite to http://localhost:2934/snapshots/3ba2a9e4.html

this is the result I get from the IIs when testing the pattern:

tesing URL rewrite iis

but I feel like the rule never gets fired, in fact, I've configured to trace failed request like this tutorial and I don't get any error or file in the logs folder. ex: C:\inetpub\logs\FailedReqLogFiles

I'm getting a 404 error instead and it's logged like this:

2015-03-28 18:56:11 ::1 GET /trabajos/3ba2a9e4/some-cool-tile - 2934 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/42.0.2311.60+Safari/537.36 - 404 0 2 4
2015-03-28 18:56:15 ::1 GET /trabajos/3ba2a9e4/some-cool-title - 2934 - ::1 Mozilla/5.0+(Windows+NT+6.3;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/42.0.2311.60+Safari/537.36 - 404 0 2 2

any ideas?

0

You Can solve this issue by following this. enter image description here

Alternatively:

<system.webServer>
        <rewrite>
            <rules>
                <rule name="1" stopProcessing="true">
                    <match url="(trabajos)/(3ba2a9e4)/(some-cool-title)" />
                    <action type="Redirect" url="{HTTP-HOST}/snapshots/{R:2}.html" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.