在共享主机上忽略web.configredirect

我有一个网页托pipe在共享的Microsoft-IIS / 8.5服务器上。 我没有该服务器上的pipe理员权限,而且我也无法访问其configuration文件,所以我无法真正确定URL重写模块或HTTPredirect元素是否已正确安装/设置。

我想build立一个名为old_folder的文件夹到一个名为old_folder的文件夹(都在我的根目录,即http://sharedhosting.com/myusername/ )redirect。 我在根文件夹中放置了以下web.config文件:

 <?xml version="1.0" encoding="UTF-8"?> <configuration> <configSections> <sectionGroup name="system.webServer"> <sectionGroup name="rewrite"> <section name="rules" overrideModeDefault="Allow" /> </sectionGroup> </sectionGroup> </configSections> <system.webServer> <rewrite> <rules> <rule name="attempt" stopProcessing="true" enabled="true"> <match url="^old_folder/$" /> <action type="Redirect" url="new_folder/" redirectType="Permanent"/> </rule> </rules> </rewrite> </system.webServer> </configuration> 

但是我所能得到的只是一个403.14 - Forbidden: Access is denied. (如果我留下一个空的old_folder )或404.0 - File or directory not found. (如果我删除它)。

我尝试使用HTTP Redirect ,通过在old_folder放置一个包含Web.config文件

 <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpRedirect enabled="true" destination="http://sharedhosting.com/myusername/new_folder/" /> </system.webServer> </configuration> 

但是这也没有奏效。

我知道我的Web.config文件被读取(如果在它们中有错误,我可以得到500个错误,例如,我可以激活httpErrors的Detailed错误模式)。 我怀疑URL重写是安装的,因为,例如, http://sharedhosting.com/myusername/folder ://sharedhosting.com/myusername/folder被重写为http://sharedhosting.com/myusername/folder/ (即,用斜杠),如果该folder文件夹存在。

我的规则是否正确? 我的主机是否阻止我redirect? 如果是的话,我怎么知道?

我在<rules>标签后面添加了一个<clear />来放弃所有其他的重写规则,但是并没有closures前面提到的斜线。

我错过了什么? 为什么不redirect有效?