问题描述
根据我的其他问题,我无法使UrlRewriter.NET工作。
As per my other question UrlRewriter.NET with .NET 4.0 not working I was unable to get UrlRewriter.NET to work.
所以现在我尝试了ManagedFusion。它可以在本地运行,但不能在服务器上运行,但错误有所不同,我感觉这可能确实可行,并且我在配置中做错了。
So now I have tried ManagedFusion. It works locally but does not work on the server BUT the errors are different and I sense that this might actually work and I have done something wrong in the configuration.
所以我的web.config设置为(精简版)
So my web.config settings are (condensed version)
<configuration>
<configSections>
<section name="managedFusion.rewriter" type="ManagedFusion.Rewriter.Configuration.ManagedFusionRewriterSectionGroup"/>
</configSections>
<managedFusion.rewriter xmlns="http://managedfusion.com/xsd/managedFusion/rewriter">
<rules engine="Apache">
<apache defaultFileName="ManagedFusion.Rewriter.txt" />
</rules>
<rewriter>
<proxy useAsyncProxy="true" />
</rewriter>
</managedFusion.rewriter>
<system.web>
<identity impersonate="false" />
<httpModules>
<add name="RewriterModule" type="ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter"/>
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="RewriterModule" type="ManagedFusion.Rewriter.RewriterModule, ManagedFusion.Rewriter" />
</modules>
<handlers>
<add name="RewriterProxyHandler" preCondition="integratedMode" verb="*" path="RewriterProxy.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</handlers>
<defaultDocument enabled="false" />
</system.webServer>
我的ManagedFusion.Rewriter.txt是
My ManagedFusion.Rewriter.txt is
RewriteEngine On
RewriteBase /
#
# Campaign
RewriteRule ^/Campaign/List /Campaign/List.aspx [NC]
现在,这在我的本地计算机上工作得很好(Visual Studio 2010),但是当我上载它时,我得到一个404,说它找不到/Campaign/List.aspx。
Now this works perfectly fine on my local machine (Visual Studio 2010) but when I upload it I get a 404 that says it can't find /Campaign/List.aspx.
最重要的是, SSL,我不希望该帐户的SSL证书用于其他子域,因此会引发SSL错误。
And on top of this it also goes to SSL, which I don't want as the SSL cert on that account is for a different subdomain and hence throws an SSL error.
我在做错什么吗?似乎这次URL模块正在处理所有请求,这似乎是我以某种方式对其进行了错误配置。
Is there something I am doing wrong? It seems this time the URL module is handling all requests and this looks like I have configured it incorrectly somehow.
其他信息
-
运行IIS 7.0-集成管道
Running IIS 7.0 - Integrated Pipeline
.NET 4.0
推荐答案
这实际上是一个非常常见的 GoDaddy
问题。在查看 CodePlex
网站上的笔记和论坛后,我将发布此答案的更新。
Hi this is actually a very common GoDaddy
issue. I am going to post an update to this answer after I review my notes and forums on the CodePlex
site.
(通过我是它的主要开发者)
(by the way I am the primary developer of it)
请注意,如果我们将此离线,我们需要来回聊天,以便我了解您的设置。 readme.txt
中介绍的解决问题的一种快速方法是打开日志记录。
You mind if we take this offline, we need to chat back and forth so I can understand your setup. A quick way as explained in the readme.txt
to trouble shoot problems is to turn on the logging.
RewriteLog /log/log.txt
RewriteLogLevel 9
GoDaddy
的唯一问题是您需要创建此日志目录并为其授予写权限,因为如果我没记错的话, GoDaddy
不允许在根目录中具有写权限。
The only problem with GoDaddy
is that you need to create this log directory and give it write permissions, because if I remember right GoDaddy
doesn't allow write permissions in the root.
这篇关于ManagedFusion网址重写不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!