Phpstudy installation options, iis+php combinations, how to set pseudo-static

Source: Internet
Author: User

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&amp;topic={r:2}&amp; {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&amp;aid={r:2}&amp;page={r:3}&amp; {R:4}"/> </rule> <rule name="Forum_forumdisplay"> <match url="^ (./) *forum-(\w+)-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/forum.php\?mod=forumdisplay&amp;fid={r:2}&amp;page={r:3}&amp; {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&amp;tid={r:2}&amp;extra=page%3d{r:4}&amp;page={r:3}&amp; {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&amp;fid={r:2}&amp;page={r:3}&amp; {R:4}"/> </rule> <rule name="Home_space"> <match url="^ (./) *space-(Username|uid)-(. +). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/home.php\?mod=space&amp; {r:2}={r:3}&amp; {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&amp;uid={r:2}&amp;do=blog&amp;id={r:3}&amp; {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}&amp;value={r:3}&amp; {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}&amp; {R:4}"/> </rule><rule name="help_list"> <match url="^ (. * *) *list-(\w+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id=wq_help&amp;cid={r:2}&amp; {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&amp;mod=list&amp;classid={r:2}&amp;displayorder={r:3 }&amp;page={r:4}&amp; {R:5}"/> </rule> <rule name="Article_view"> <match url="^ (. * *) *wechatarticle-([0-9]+). html\?* (. *) $"/> <action type="Rewrite"Url="{r:1}/plugin.php\?id=wq_wechatcollecting&amp;mod=view&amp;articleid={r:2}&amp; {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&amp;mod=list&amp;classid={r:2}&amp;displayorder={r:3}& amp;page={r:4}&amp; {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&amp;mod=view&amp;wid={r:2}&amp;page={r:3}&amp; {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

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.