phpstudy 安装选择,iis+php组合,如何设置伪静态
如题。
找了半天,终于找到解决方案了。
需要在服务器上安装 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&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}&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>
我用的是discuz的一套伪静态规则。
phpstudy 安装选择,iis+php组合,如何设置伪静态的更多相关文章
- phpstudy 安装Apache SSL证书实现https连接
Windows phpstudy安装ssl证书教程. 工具/原料 phpstudy 集成环境 申请的SSL证书 方法/步骤 首先申请免费的ssl证书,很多地方都可以申请.我是在腾讯云!如图 ...
- phpstudy 安装 Apcahe SSL证书 实现https连接
摘自:https://jingyan.baidu.com/article/64d05a022e6b57de54f73b51.html Windows phpstudy安装ssl证书教程. 工具/原料 ...
- XAMPP/PHPnow/phpStudy安装使用对比
一.XAMPP 1.1 下载 下载地址:https://www.apachefriends.org/download.html 1.2 安装 双击下载的安装程序进行安装,界面如下图,都是典型的下一步下 ...
- ASP.NET在IIS的启动优化设置
ASP.NET在IIS的启动优化设置 约定: IIS=Internet Information Services Manager 概要 因为ASP.NET 程序在第一次启动的时候需要等待太长时间,至少 ...
- Windows10 下安装配置IIS + MySQL5.7.19 + nginx1.12.1 + php7.1.7
环境: VMWare Workstation Player12 Windows10 Pro x64 一.安装系统 vmware 会采用 fast install 方式很快装完,无需配置什么. 二.配置 ...
- WordPress安装篇(1):使用PHPStudy安装WordPress
我是"小白",既不会编程也不懂CSS能自己搭建网站吗?可以的!只要你会用鼠标,懂打字就能搭建出属于你自己的网站.要怎么样才能做到昵?让我们一起来看看如何实现的吧.在Windows环 ...
- 在Ubuntu|CentOS上安装Shutter截图工具及快捷键设置
简介 Shutter前身叫GScrot,它是一款相当棒的截图软件. 通过Shutter,你可以截取包括选定区域.全屏幕.窗口.窗口内的控件甚至网页的图像.通过内置的强大插件机制,你可以在截图后,对图像 ...
- 关于JDK 安装,以及Java环境的设置
关于JDK 安装,以及Java环境的设置 1.下载JDK1.6,选择对应的安装路径 2.配置相应的Java 环境变量 A.属性名称:JAVA_HOME 属性值:C:\Program Files\Jav ...
- IIS大数据请求设置方法
大并发大数据量请求一般会分为几种情况: 1.大量的用户同时对系统的不同功能页面进行查找,更新操作 2.大量的用户同时对系统的同一个页面,同一个表的大数据量进行查询操作 3.大量的用户同时对系统的同一个 ...
随机推荐
- webform注册和Repeater
一.注册1.日期(1)年月日用三DropDownList个,分别循环写入数字 代码写在后台 Page_Load中的代码 if (IsPostBack == false) { //年绑定数据 ; i- ...
- Ubuntu下shell脚本运行异常:bash和dash的区别
Ubuntu下我用bash到语法写了一个shell脚本(准确的说是把书上的脚本敲进电脑),在ubuntu下,用sh test.sh来运行,但是出现了意料之外到结果,比如echo -e "\n ...
- 介绍开源的.net通信框架NetworkComms框架 源码分析(十三)ThreadSafeStream
原文网址: http://www.cnblogs.com/csdev Networkcomms 是一款C# 语言编写的TCP/UDP通信框架 作者是英国人 以前是收费的 目前作者已经开源 许可是 ...
- AESwithJCE http://www.coderanch.com/how-to/content/AES_v1.html
Using AES with Java Technology By Rags SrinivasJune 2003 In September 2000, the National Institute o ...
- 学习python之练习(二)
#2.已知a1=1,a2=2,an=a(n-1)+a(n-2)(n>=3),求数列{a1,a2,a3....an}的总和 import math arr = [0]*100 num = 0 fo ...
- java读取属性文件propertie中文乱码问题
在属性文件中使用Unicode编码中文 propertie文件默认编辑就是Unicode编码
- [vb.net]XML File Parsing in VB.NET
Introduction Parsing XML files has always been time consuming and sometimes tricky. .NET framework p ...
- css3的学习笔记1
一. 边框 1. border-color border-color是设置边框的颜色.包括border-top-color,border-left-color,border-right-colo ...
- 4.13-4.17c语言学习
这周学习开始接触c语言,使用的工具是c-free5,主要是把之前的一些函数流程图通过编写代码实现运行,本周最后一天的作业是做简易的atm机运行逻辑程序,是在main主函数外附加使用void函数,其主要 ...
- 【DLL测试】为DLL项目建立测试
本文将创建一个简单的动态链接库,并编写一个控制台应用程序使用该动态链接库,该动态链接库为“JAVA调用动态链接库DLL之JNative学习”中使用的DLL, 只是项目及文件名称不同. 创建动态链接库项 ...