Categories


Tags


windows+iis脚本映射方式实现伪静态(包括asp.net)

一 . Windows2008、2012或更高系统

只需要在设置脚本影射的目录下创建web.config文件,其内容为

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

<system.webServer>

<handlers>

<add name="ttt-map" path="*.ttt" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="File" preCondition="classicMode,runtimeVersionv4.0,bitness32" />

</handlers>

</system.webServer>

</configuration>

注意: name="ttt-map" 所在行代码设置是将ttt后缀的文件映射到aspnet4.0或aspnet4.5,path="*.ttt"部分请自行按需求修改.

二 . 其他示例:

1.将html后缀的文件映射到aspnet2.0或aspnet3.5

<add name="html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="File" preCondition="classicMode,runtimeVersionv2.0,bitness32" />

2.将html后缀的文件映射到asp

<add name="html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" preCondition="bitness32" />

3.将html后缀的文件映射到php5.2isapi模式,5.2cgi模式,5.3,5.4版本(我司虚拟主机对应路径)

<add name="html" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\php_52\php5isapi.dll" resourceType="File" preCondition="bitness32" />

<add name="html" path="*.html" verb="*" modules="CgiModule" scriptProcessor="C:\php_52\php.exe" resourceType="File" preCondition="bitness32" />

<add name="html" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\php_53\php.exe" resourceType="File" preCondition="bitness32" />

<add name="html" path="*.html" verb="*" modules="FastCgiModule" scriptProcessor="C:\php_54\php-cgi.exe" resourceType="File" preCondition="bitness32" />

注意:如果自身已经是aspnet程序,可直接在system.webServer的handlers节中添加相应映射代码,另外还需将程序池切换到经典模式,并开启32兼容脚本映射设置才会生效

如果需要设置全局的通配符映射,直接在控制面板-伪静态设置-.NET通配符映射启用即可

来源:西部数码


Public @ 2014-02-28 16:11:04

Windows Server 2012 IIS安装教程

这篇文章主要介绍了Windws Server 2012的网站环境配置之安装IIS方法,需要的朋友可以参考下。Windows Server 2012 R2是目前主流的服务器系统之一,其使用简单,性能卓越,已经有越来越多的公司使用其作为业务服务的载体。互联网信息服务IIS(Internet Information Services),是由微软公司提供的基于运行Microsoft Windows的互联网

Public @ 2014-03-23 15:47:25

Linux服务器远程登陆和修改远程端口号教程

Linux装好系统之后一般默认的远程端口都是22,一般用putty(免费),Xshell(收费,网上应该有破解版)等工具来远程登录到服务器,环境:这里用虚拟机搭建了一台centos系统,ip是192.168.106.128一、远程教程:1、用putty工具远程:打开下载好的putty这个是图标然后双击图片1.png1554606872265026520.png然后点击打开会提示输入账户密码1554

Public @ 2013-07-18 15:47:30

IIS 6.0 伪静态的配置方法

首先下载一个伪静态组件-rewrite,放到网站根目录image.png打开IIS信息管理器,右击需要添加伪静态功能的站点,选择“属性”—再点击“ISAPI筛选器”,点击右侧的“添加”,“筛选器名称”输入rewrite ,“可行执行文件”处点击右侧的“浏览”,rewrite文件夹image.png选择文件“Rewrite.dll”后点“打开image.png下载 ISAPI_Rewrite3 并安

Public @ 2018-11-12 16:11:02

更多您感兴趣的搜索

0.478927s