Jump to content

ASP.NET URL Rewriting


Recommended Posts

How can I make this: http://oz.heliohost.org/Programming/Home.aspx

into this: http://oz.heliohost.org/Programming/Home

 

so it doesn't show the extension. I got this code but I do not know where to put it:

 

<rule name="san aspx">
         <!--Removes the .aspx extension for all pages.-->
         <match url="(.*)" />
         <conditions logicalGrouping="MatchAll">
           <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
           <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
         </conditions>
         <action type="Rewrite" url="{R:1}.aspx" />
       </rule> 

 

I think it has something to do with IIS

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...