IIS 8.5 伪静态去掉index.php thinkphp 3.2.2
因为测试都是在win下开发的 win8.1企业版
II8.5 首先安装 Thinkphp 3.2.2
URL Rewrite Module 2.0
http://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads
上面地址选择 合适的版本下载安装
安装完成后 关闭IIS 在重新打开

在你建立的网站根目录有 web.config 这个文件
输入伪静态规则
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
具体位置参考下我的
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<add value="index.php" />
</files> </defaultDocument>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite> </system.webServer> </configuration>
然后访问以前带index.php/控制器/方法 的链接 去掉index.php看看
这个index.php对于JS来说 很不好 用uploadify上传后台地址用U函数生成index.php就很不好 总出错
其他的一到后台地址 有index.php总是出错
伪静态规则还是不懂 等先做出来慢慢研究下
IIS 8.5 伪静态去掉index.php thinkphp 3.2.2的更多相关文章
- tp路由+伪静态+去掉index.php
浏览:10536 发布日期:2013/10/08 分类:技术分享 关键字: 路由 伪静态 去掉index.php 之前一个网友说能不能达到这样的效果,www.olcms.com/news/id.htm ...
- IIS7以上版本去掉伪静态去掉index.php方法
1,由于从iis7以上的版本httpd.ini文件已不会被解析,将以下的xml文件复制到web.config 的文件中,然后放到网站的根目录即可. <?xml version="1.0 ...
- CodeIgniter学习笔记四:CI中的URL相关函数,路由,伪静态,去掉index.php
一.URL相关函数 1.加载url模块 加载url有两种方式: a.自动加载:在 application/config/autoload.php 中开启 $autoload['helper'] = a ...
- ThinkPHP 3.2,配置 'URL_MODEL'=>2。 APP_DEBUG设为false,U函数生成的URL的index.php不能去掉,只有将APP_DEBUG改成true,才能去掉index.php,求解~~
ThinkPHP 3.2,配置 'URL_MODEL'=>2.APP_DEBUG设为false,U函数生成的URL的index.php不能去掉,只有将APP_DEBUG改成true,才能去掉in ...
- nginx 静态化合集(去掉index.php目录)
访问某域名时,去掉index.php目录时达到效果一样 如:www.test1/index.php/test2跟www.test1/test2效果一致 在vhosts.conf中加重写就可以了 loc ...
- php CI 实战教程:如何去掉index.php目录
Windows下自由创建.htaccess文件的N种方法 .htaccess是apache的访问控制文件,apache中httpd.conf的选项配合此文件,完美实现了目录.站点的访问控制,当然最多的 ...
- dedecms首页去掉index.html怎么设置
很多网友用IIS服务器建站,反映说dedecms首页默认多了一个/index.html,一般是没有这个后缀的,直接就**.com,那么如何将dedecms首页去掉index.html呢?很简单,服务器 ...
- ***CodeIgnite/CI 去掉 index.php的 配置
CI有效删除URL中的index.php 参考: http://codeigniter.org.cn/forums/thread-15444-1-1.html 读CI的使用手册的话,关于如何有效删除U ...
- php程序Apache,IIS 7,nginx 伪静态配置方法总汇
一,Apache 环境伪静态配置方法: 在根目录下放置一个.htaccess 文件,内容如下: <IfModule mod_rewrite.c> Options +FollowSymlin ...
随机推荐
- httpclient提示Cookie rejected: violates RFC 2109: domain must start with a dot
使用httpclient时发生如下告警信息: WARN - HttpMethodBase.processResponseHeaders(1505) | Cookie rejected: "$ ...
- Jquery-选择框点击勾选或者取消
1:单选框,直接定位到属性名称 $(document).ready(function(){ var old = null; //用来保存原来的对象 $("input[name='sex']& ...
- 【收藏】Android屏幕适配全攻略(最权威的Google官方适配指导)
来源:http://blog.csdn.net/zhaokaiqiang1992 更多:Android AutoLayout全新的适配方式, 堪称适配终结者 Android的屏幕适配一直以来都在折磨着 ...
- 系统间通信(8)——通信管理与RMI 上篇
1.概述 在概述了数据描述格式的基本知识.IO通信模型的基本知识后.我们终于可以进入这个系列博文的重点:系统间通信管理.在这个章节我将通过对RMI的详细介绍,引出一个重要的系统间通信的管理规范RPC, ...
- Spring常用注解,自动扫描装配Bean
1 引入context命名空间(在Spring的配置文件中),配置文件如下: xmlns:context="http://www.springframework.org/schema/con ...
- perl array, scalar and hash
#!/usr/bin/perl use strict; use warnings; my @aa=("aa", "bb", "cc"); p ...
- 用 phylomatic 软件生成的进化树
用 phylomatic 软件生成的进化树 Phylomatic是在线软件,可以利用植物名录,按照APGIII的被子植物科的拓扑结构,生成进化树. 参考 张金龙博士 工作目录 setwd(" ...
- 2.python算法之回形矩阵
代码: #!/usr/bin/env python # encoding: utf-8 """ @author: 侠之大者kamil @file: 2.回形矩阵.py @ ...
- [bzoj1787][Ahoi2008]紧急集合
Description 给定一棵大小为的树,有组询问,每组询问给三个点,求到这三个点距离和最小的点及最小距离和. Input 第一行两个数. 接下来行,每行两个数表示到有一条边. 最后行,每行个数,为 ...
- leetcode 235. Lowest Common Ancestor of a Binary Search Tree
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BS ...