简体   繁体   English

301重定向为PDF文件

[英]301 Redirect for PDF file

What's the easiest way to go about redirecting a URL like this: 像这样重定向URL的最简单方法是:

http://domain.tld/my%20file.pdf

To another URL: 到另一个URL:

http://anotherdomain.tld/another%20file.pdf

This is a website and I do have access to IIS (6). 这是一个网站,我确实可以访问IIS(6)。 Is there a way to do this just within IIS? 有没有办法仅在IIS中执行此操作?

I've read a little about ISAPI plug-ins, though I've never done this. 我从未阅读过有关ISAPI插件的文章,尽管我从未做过。 Is this the only way? 这是唯一的方法吗? I've been handed a site I haven't yet been able to build (just using Open Website... in VS 2010.) So I'm not even sure I can write an HTTP module if that's another option. 我已经获得了一个我尚无法建立的站点(仅使用VS 2010中的Open Website...。)因此,即使这是另一种选择,我也不确定是否可以编写HTTP模块。 My current error has something to do with an English section that has another web.config. 我当前的错误与包含另一个web.config的英语部分有关。

Error 6 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. 错误6使用超出应用程序级别注册为allowDefinition ='MachineToApplication'的节是错误的。 This error can be caused by a virtual directory not being configured as an application in IIS. 此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的。 C:\\path\\to\\site\\englishsubdirectory\\app\\Web.config C:\\ path \\ to \\ site \\ english子目录\\ app \\ Web.config

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM