« Previous Next »

Answered Thread: change .aspx to other like .abcd with rewriteModule

Last post 07-17-2009 2:29 AM by sadegh-shad. 4 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (5 items)

Sort Posts:

  • 07-04-2009, 3:43 PM

    change .aspx to other like .abcd with rewriteModule

    hello all

    i want to change .aspx to like .abcd with rewriteModule in asp.net and iis7?

    therefore when user typed home/default.aspx must be redirect to home/default.abcd

    please help me

    excuse for my weakly english writing

    thanks all

  • 07-08-2009, 12:19 AM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 664

    Answered Re: change .aspx to other like .abcd with rewriteModule

    Check out this blog post http://blogs.iis.net/carlosag/archive/2008/09/02/iis-7-0-and-url-rewrite-make-your-web-site-seo.aspx. Look into section 3) Site Reorganization.

    http://ruslany.net
  • 07-16-2009, 2:22 AM In reply to

    Re: change .aspx to other like .abcd with rewriteModule

     Thank you ruslan

    According to you that I read post above and I do this I use the following rule for rewriting.

     

    <rule name="Rewrite aspx" stopProcessing="false">
     <match url="(.*).abcd" />
     <action type="Rewrite" url="{R:1}.aspx" />
    </rule>



    Now I use a rule when the other user typed an address that ending with .aspx, must redirect to this address with the suffix .abcd.

     

    <rule name="Redirect aspx" stopProcessing="true">
     <match url="(.*).aspx" />
     <action type="Redirect" url="{R:1}.abcd" redirectType="Permanent" />
    </rule>

     

    but I face Redirect Loop message. Please help me to.



    Very Thank

  • 07-16-2009, 4:59 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 664

    Re: change .aspx to other like .abcd with rewriteModule

    Make sure that "Redirect aspx" rule is located before the "Rewrite aspx" rule in the <rules> collection. The relative order of the rules is importat.

    http://ruslany.net
  • 07-17-2009, 2:29 AM In reply to

    Re: change .aspx to other like .abcd with rewriteModule

     ok, redirect rule placed before rewrite rule, But the problem still exists

Page 1 of 1 (5 items)
Microsoft Communities