IIS 7.5 Sets the pseudo-static rule method via Web.config

Source: Internet
Author: User
Tags config thread

is7.5 under the common program through the Web.config implementation of pseudo static create a Web.config named file content of

<?xml version= "1.0" encoding= "UTF-8"?>
<configuration>
<system.webServer>
<!--Add the following rules here-->
</system.webServer>
</configuration>

Remember the background of pseudo static to open OH


For example, under the Shopex rule, select the rule you want to add:

&lt;!--shopex--&gt;


&lt;rewrite&gt;


&lt;rules&gt;


&lt;rule name= "disabledownloadthemehtml" &gt;


&lt;match url= "^themes/.*. (html|xml) $ "ignorecase=" false "/&gt;


&lt;action type= "Customresponse" url= "/" statuscode= "403" statusreason= "Forbidden" statusdescription= "Forbidden"/ &gt;


&lt;/rule&gt;


&lt;rule name= "Urlrewrite" &gt;


&lt;match url= "^ (. *) $" ignorecase= "false"/&gt;


&lt;conditions logicalgrouping= "Matchall" &gt;


&lt;add input= "{request_filename}" pattern=. (html|xml|json|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|cgi|shtml|shtm|phtm) $ " Ignorecase= "false"/&gt;


&lt;add input= "{request_filename}" matchtype= "Isfile" negate= "true" pattern= "" ignorecase= "f Alse "/&gt;


&lt;add input= "{request_filename}" matchtype= "Isdirectory" negate= "true" pattern= "" Ignoreca Se= "false"/&gt;


&lt;/conditions&gt;


&lt;action type= "Rewrite" url= "index.php"? {r:1} "appendquerystring= false"/&gt;


&lt;/rule&gt;


&lt;/rules&gt;


&lt;/rewrite&gt;


&lt;!--dz2.0--&gt;


&lt;rewrite&gt;


&lt;rules&gt;


&lt;rule name= "Portal_topic" &gt;


&lt;match url= "^ (. * *) *topic-(. +). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/portal.php?mod=topic&amp;amp;topic={r:2}&amp;amp;" {r:3} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Portal_article" &gt;


&lt;match url= "^ (. * *) *article-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/portal.php?mod=view&amp;amp;aid={r:2}&amp;amp;page={r:3}&amp;amp;" {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Forum_forumdisplay" &gt;


&lt;match url= "^ (. * *) *forum-(w+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{R:1}/forum.php?mod=forumdisplay&amp;amp;fid={r:2}&amp;amp;page={r:3}&amp;amp ; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Forum_viewthread" &gt;


&lt;match url= "^ (. * *) *thread-([0-9]+)-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/forum.php?mod=viewthread&amp;amp;tid={r:2}&amp;amp;extra=page={r:4}" &amp;amp;page={R:3}&amp;amp; {r:5} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Group_group" &gt;


&lt;match url= "^ (. * *) *group-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/forum.php?mod=group&amp;amp;fid={r:2}&amp;amp;page={r:3}&amp;amp;" {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Home_space" &gt;


&lt;match url= "^ (. * *) *space-(USERNAME|UID)-(. +). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/home.php?mod=space&amp;amp;" {r:2}={r:3}&amp;amp; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Home_blog" &gt;


&lt;match url= "^ (. * *) *blog-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{R:1}/home.php?mod=space&amp;amp;uid={r:2}&amp;amp;do=blog&amp;amp;id={r:3}" &amp;amp; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Forum_archiver" &gt;


&lt;match url= "^ (. * *) * (Fid|tid)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/index.php?action={r:2}&amp;amp;value={r:3}&amp;amp;" {r:4} "/&gt;


&lt;/rule&gt;


&lt;/rules&gt;


&lt;/rewrite&gt;


&lt;!--dz2.5--&gt;


&lt;rewrite&gt;


&lt;rules&gt;


&lt;rule name= "Portal_topic" &gt;


&lt;match url= "^ (. * *) *topic-(. +). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/portal.php?mod=topic&amp;amp;topic={r:2}&amp;amp;" {r:3} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Portal_article" &gt;


&lt;match url= "^ (. * *) *article-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/portal.php?mod=view&amp;amp;aid={r:2}&amp;amp;page={r:3}&amp;amp; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Forum_forumdisplay" &gt;


&lt;match url= "^ (. * *) *forum-(w+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{R:1}/forum.php?mod=forumdisplay&amp;amp;fid={r:2}&amp;amp;page={r:3}&amp;amp ; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Forum_viewthread" &gt;


&lt;match url= "^ (. * *) *thread-([0-9]+)-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/forum.php?mod=viewthread&amp;amp;tid={r:2}&amp;amp;extra=page={r:4}" &amp;amp;page={R:3}&amp;amp; {r:5} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Group_group" &gt;


&lt;match url= "^ (. * *) *group-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/forum.php?mod=group&amp;amp;fid={r:2}&amp;amp;page={r:3}&amp;amp;" {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Home_space" &gt;


&lt;match url= "^ (. * *) *space-(USERNAME|UID)-(. +). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/home.php?mod=space&amp;amp;" {r:2}={r:3}&amp;amp; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Home_blog" &gt;


&lt;match url= "^ (. * *) *blog-([0-9]+)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{R:1}/home.php?mod=space&amp;amp;uid={r:2}&amp;amp;do=blog&amp;amp;id={r:3}" &amp;amp; {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "Forum_archiver" &gt;


&lt;match url= "^ (. * *) * (Fid|tid)-([0-9]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/index.php?action={r:2}&amp;amp;value={r:3}&amp;amp;" {r:4} "/&gt;


&lt;/rule&gt;


&lt;rule name= "plugin" &gt;


&lt;match url= "^ (. * *) * ([a-z]+[a-z0-9_]*)-([a-z0-9_-]+). html?* (. *) $"/&gt;


&lt;action type= "Rewrite" url= "{r:1}/plugin.php?id={r:2}:{r:3}&amp;amp;" {r:4} "/&gt;


&lt;/rule&gt;


&lt;/rules&gt;


&lt;/rewrite&gt;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.