Title.
Looking for a long, finally found a solution.
You need to install the URL rewrite component on the server.
The server is 64-bit installed: Rewrite_2.0_rtw_x64.exe
Then add the Web. config profile and place it at the root of the site.
The contents of the file are as follows:
<?xml version="1.0"encoding="UTF-8"?><configuration> <system.webServer> <defaultDocument> <files> <clear/> <add value="index.php"/> <add value="portal.php"/> <add value="Default.htm"/> <add value="index.htm"/> <add value="Default.asp"/> <add value="index.html"/> <add value="iisstart.htm"/> <add value="Default.aspx"/> </files> </defaultDocument><rewrite> <rules> <rule name="Portal_topic"> <match url="^ (. * *) *topic-(. +). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/portal.php\?mod=topic&topic={r:2}& {R:3}"/> </rule> <rule name="portal_article"> <match url="^ (. */) *article-([0-9]+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/portal.php\?mod=view&aid={r:2}&page={r:3}& {R:4}"/> </rule> <rule name="Forum_forumdisplay"> <match url="^ (./) *forum-(\w+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/forum.php\?mod=forumdisplay&fid={r:2}&page={r:3}& {R:4}"/> </rule> <rule name="Forum_viewthread"> <match url="^ (./) *thread-([0-9]+)-([0-9]+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/forum.php\?mod=viewthread&tid={r:2}&extra=page%3d{r:4}&page={r:3}& {R:5}"/> </rule> <rule name="Group_group"> <match url="^ (. */) *group-([0-9]+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/forum.php\?mod=group&fid={r:2}&page={r:3}& {R:4}"/> </rule> <rule name="Home_space"> <match url="^ (./) *space-(Username|uid)-(. +). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/home.php\?mod=space& {r:2}={r:3}& {R:4}"/> </rule> <rule name="Home_blog"> <match url="^ (. */) *blog-([0-9]+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/home.php\?mod=space&uid={r:2}&do=blog&id={r:3}& {R:4}"/> </rule> <rule name="Forum_archiver"> <match url="^ (. */) * (Fid|tid)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/index.php\?action={r:2}&value={r:3}& {R:4}"/> </rule> <rule name="plugin"> <match url="^ (. */) * ([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id={r:2}:{r:3}& {R:4}"/> </rule><rule name="help_list"> <match url="^ (. * *) *list-(\w+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id=wq_help&cid={r:2}& {R:3}"/> </rule> <rule name="article_list"> <match url="^ (./) *articlelist-([0-9]+)-([0-9]+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{R:1}/plugin.php\?id=wq_wechatcollecting&mod=list&classid={r:2}&displayorder={r:3 }&page={r:4}& {R:5}"/> </rule> <rule name="Article_view"> <match url="^ (. * *) *wechatarticle-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id=wq_wechatcollecting&mod=view&articleid={r:2}& {R:3}"/> </rule> <rule name="wechat_list"> <match url="^ (./) *wechatlist-([0-9]+)-([0-9]+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id=wq_wechatshow&mod=list&classid={r:2}&displayorder={r:3}& amp;page={r:4}& {R:5}"/> </rule> <rule name="Wechat_view"> <match url="^ (./) *wechat-(\w+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id=wq_wechatshow&mod=view&wid={r:2}&page={r:3}& {R:4}"/> </rule> </rules></rewrite> </system.webServer></configuration>
View Code
I'm using a set of pseudo-static rules for discuz.
Phpstudy installation options, iis+php combinations, how to set pseudo-static