西部数码虚拟主机iis怎么路由重写,去除隐藏index.php
2017-08-19 14:34
736 查看
按道理说西部数码里面有一个伪静态选项, 我们通常配置的时候是用.htaccess 来隐藏index.php 有一个客户用的是西部数码的,折腾了很久就是不能成功
我们点击伪静态设置,选择 shopex 然后wwwroot 目录回生成一个web.config文件,编辑其文件下面的代码覆盖她
这样就隐藏了index.php
我们点击伪静态设置,选择 shopex 然后wwwroot 目录回生成一个web.config文件,编辑其文件下面的代码覆盖她
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <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> <directoryBrowse enabled="false" /> <defaultDocument> <files> <clear /> <add value="index.asp" /> <add value="index.aspx" /> <add value="index.php" /> <add value="index.html" /> <add value="Default.htm" /> <add value="Default.asp" /> <add value="index.htm" /> <add value="Default.aspx" /> <add value="index.shtml" /> </files> </defaultDocument> <httpErrors> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" /> </httpErrors> <security> <requestFiltering allowDoubleEscaping="true"></requestFiltering> </security> </system.webServer> </configuration>
这样就隐藏了index.php
相关文章推荐
- Apache重写路由,隐藏index.php
- 阿里云虚拟主机 隐藏index.php的方法
- Apache重写路由,隐藏index.php
- wamp server虚拟主机设置index.php隐藏(入口文件隐藏)
- 虚拟空间iis环境下如何隐藏index.php
- 虚拟空间iis环境下如何隐藏index.php
- nginx重写url隐藏index.php
- thinkphp 隐藏index.php iis apache nginx
- thinkphp的nginx配置,以及重写隐藏index.php入口文件
- ThinkPHP5隐藏index.php在Win7或者Win2008R2下IIS设置
- Ubuntu Server 14.04 & Apache2.4 虚拟主机、模块重写、隐藏入口文件配置
- YII 1.0 隐藏单入口index.php 设置路由与伪静态
- apache 配置虚拟目录+默认页+隐藏index.php
- 看看我怎么虚拟主机域名绑定子目录 asp php html (通用)
- mac下使用tp5 apache 设置虚拟域名并隐藏index.php
- IIS 服务器隐藏index.php 的方法
- 去除虚拟路径中的多余index.php
- CI 框架怎么去掉隐藏入口文件 index.php
- nginx重写规则隐藏index.php
- IIS7.5 去除 index.php web.config配置文件