如题。

找了半天,终于找到解决方案了。

需要在服务器上安装 Url rewrite 组件。

服务器是64位则安装:rewrite_2.0_rtw_x64.exe

然后添加 web.config配置文件,放到站点的根目录。

文件内容如下:

<?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>

我用的是discuz的一套伪静态规则。

phpstudy 安装选择,iis+php组合,如何设置伪静态的更多相关文章

  1. phpstudy 安装Apache SSL证书实现https连接

    Windows phpstudy安装ssl证书教程. 工具/原料   phpstudy 集成环境 申请的SSL证书 方法/步骤     首先申请免费的ssl证书,很多地方都可以申请.我是在腾讯云!如图 ...

  2. phpstudy 安装 Apcahe SSL证书 实现https连接

    摘自:https://jingyan.baidu.com/article/64d05a022e6b57de54f73b51.html Windows phpstudy安装ssl证书教程. 工具/原料 ...

  3. XAMPP/PHPnow/phpStudy安装使用对比

    一.XAMPP 1.1 下载 下载地址:https://www.apachefriends.org/download.html 1.2 安装 双击下载的安装程序进行安装,界面如下图,都是典型的下一步下 ...

  4. ASP.NET在IIS的启动优化设置

    ASP.NET在IIS的启动优化设置 约定: IIS=Internet Information Services Manager 概要 因为ASP.NET 程序在第一次启动的时候需要等待太长时间,至少 ...

  5. Windows10 下安装配置IIS + MySQL5.7.19 + nginx1.12.1 + php7.1.7

    环境: VMWare Workstation Player12 Windows10 Pro x64 一.安装系统 vmware 会采用 fast install 方式很快装完,无需配置什么. 二.配置 ...

  6. WordPress安装篇(1):使用PHPStudy安装WordPress

    我是"小白",既不会编程也不懂CSS能自己搭建网站吗?可以的!只要你会用鼠标,懂打字就能搭建出属于你自己的网站.要怎么样才能做到昵?让我们一起来看看如何实现的吧.在Windows环 ...

  7. 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置

    简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...

  8. 关于JDK 安装,以及Java环境的设置

    关于JDK 安装,以及Java环境的设置 1.下载JDK1.6,选择对应的安装路径 2.配置相应的Java 环境变量 A.属性名称:JAVA_HOME 属性值:C:\Program Files\Jav ...

  9. IIS大数据请求设置方法

    大并发大数据量请求一般会分为几种情况: 1.大量的用户同时对系统的不同功能页面进行查找,更新操作 2.大量的用户同时对系统的同一个页面,同一个表的大数据量进行查询操作 3.大量的用户同时对系统的同一个 ...

随机推荐

  1. 运行时报错-Verify the Developer App certificate for youraccount is trusted on your device. Open Settings on Mayoyi_sakura and navigate to General -> Device Management, then select your

    解决方法:打开手机设置->通用->设备管理,找到编辑工程时的ID资料,点击允许即可.

  2. Java swing项目-图书管理系统(swing+mysql+jdbc)

    (一)项目功能分析 该项目是设计一个图书管理系统,主要包含的内容有: (1)管理员登陆界面 ->信息录入 ->登录 ->重置 (2)图书管理系统总界面 ->子界面菜单: 1)图 ...

  3. python--自动删除文件

    1.目的:定期自定删除7天前的数据 python脚本如下: #coding=utf-8 import os,time,datetime #需定时删除的目录的上一层路径 data_dir="/ ...

  4. const in C++

    const关键字是C++中常用的类型修饰符,用法非常灵活,使用const将大大改善程序的健壮性. const的作用 1.  定义const常量: 比如: const int Max = 100; 2. ...

  5. Thrift中实现按照时间戳范围操作Hbase数据

    在一次做项目的过程中,要实现一个功能,功能描述为前端给定日期范围,在该日期范围内取出指定行的信息.在Thrift常用的API中,取出一行所有的数据接口为getVer(),getver()具体描述如下: ...

  6. Spring 4 官方文档学习(十二)View技术

    关键词:view technology.template.template engine.markup.内容较多,按需查用即可. 介绍 Thymeleaf Groovy Markup Template ...

  7. SQlserver 行转列

    列转行编程中很容易碰到,小弟在此总结下, 行转列暂时还没遇到,遇到再补充. 列转行:  , , , ,  以上都是以逗号分隔,分隔符可以自定义.

  8. ADB工具常用指令和使用情形分析

    一.ADB常用命令:(不需要进到设备,也就是:不需要执行adb shell) adb devices 列出所有的已连接的设备 adb kill-server 关闭adb adb start-serve ...

  9. 【排列组合】bzoj3505 [Cqoi2014]数三角形

    http://blog.csdn.net/zhb1997/article/details/38474795 #include<cstdio> #include<algorithm&g ...

  10. VMware12 安装 CentOS 6.5 64位

    前言:本人在配置Hadoop的过程中,需要搭建Cent OS 64 环境,借此,顺便将Cent OS 64 的安装在此记录,方便自己,也方便大家学习.本次是在VM12虚拟机中实现Cent OS 64 ...