0

I would like to rename my application, but instead of renaming the application in VS (which I may still do), I have created a new application folder under the website with the new application name, this seems to work just fine, what i would like to do is remove the older application folder but I don't want users who have the URL book marked to have a broken link. I tried URL Rewrite / Redirect in web.config ... see below: but I keep getting an Internal Server Error 500

<system.webserver>
    <rewrite>
       <rules>
        <rule name="Redirect TuitionGradeRequest">
          <match url="^(.*)/TuitionGradeRequest/(.*)$" />
          <action type="Redirect" url="{R:1}/LetterRequest/{R:2}" />
        </rule>
      </rules>
    </rewrite>
  </system.webserver>
0

In case of a redirect, the server sends the updated URL to the client and it is the client now that makes a second request to the updated URL. Try this.

    <system.webserver>
        <rewrite>
            <rules>
               <rule name="Redirect TuitionGradeRequest">
               <match url="^TuitionGradeRequest/(.*)" />
               <action type="Redirect" url="{HTTP_HOST}/LetterRequest/{R:2}" />
               </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.