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

Windows2003中不允许的父路径问题

Windows2003中不允许访问的父路径问题通常是指访问文件时出现的错误。这个错误通常发生在试图访问一个文件的父级目录,但因为权限问题或文件系统限制,不能访问该目录。 解决该问题的方法包括: 1. 检查父级目录的权限设置,确保当前用户有访问权限。 2. 检查文件系统的权限设置,确保当前用户有访问权限。 3. 确保文件路径中没有非法字符或文件名太长导致无法访问。 4. 检查操作系统是否已

Public @ 2023-06-25 21:50:13

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

IIS 6.0 伪静态的配置方法

1. 打开 IIS,选中网站,右键选择“属性”; 2. 在“主页”选项卡中,点击“配置”按钮; 3. 在“映射”选项卡中,点击“添加”按钮; 4. 在“可执行文件”栏目中输入“%windir%\Microsoft.NET\Framework\v2.0xxxx\aspnet_isapi.dll”(注意“v2.0xxxx” 是 .NET Framework 的版本号); 5. 在“限制执行(仅适用于

Public @ 2023-06-25 07:00:13

更多您感兴趣的搜索

0.456890s