Facebook     Twitter

(852)35685366(Sales)  (852)35680970(Support)    (852)96008286(WhatsApp)
Home
Current location: Home > FAQ > About Hosting >

How to realise Rewrite on ASP.NET hosting

Date:2012-05-03 15:55Origin:Unknown Author: admin Click:
Add belowed content to system.webServer in webconfig, and you can realise Rewrite function on ASP.NET hosting. rewrite rules rule name=RewriteUserFriendlyURL1 stopProcessing=true match url=^([^/]+)/([^/]+)/([^/]+)/?$ / conditions add input=
  

Add belowed content to system.webServer in webconfig, and you can realise Rewrite function on ASP.NET hosting.


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

{R:3}" />
           </rule>
      </rules>
</rewrite>

Aboved code is just for reference, please modify according to your program.

Digg
(0)
0%
Steps on
(0)
0%
------Separation line ----------------------------
Comments More Comments
Add your comment More Comments
 
Appraisal:
Expression:
Username: Password: Code:
Recommended