-1

IIS 7でセットアップされたWebサイトがあり、新しいサイトに置き換えようとしています。

古いサイトでは、ホームページとしてWN-main.aspというカスタムファイルを使用していました。

新しいサイトではASPを使用しなくなったため、メインファイルとして通常のindex.htmlを使用したいと思います。ただし、Webサイトにアクセスすると、.comを.com/WN-main.aspにリダイレクトしようとし続けます。

IISの「デフォルトドキュメント」設定では、上部にindex.htmlがあり、WN-main.aspはリストのどこにもありません(存在していませんでした)。このリダイレクトはIISのどこにありますか?:)

また、ルートディレクトリからweb.configファイルを削除し、古いWebサイト全体をサブディレクトリに配置しました。また、IISを再起動しました。このリダイレクトが置かれているアイデアはありますか?

ありがとう!

4

2 に答える 2

0

IISでは、サーバーのすべてのサイトの設定を定義するmachine.configファイルなど、Webサイト以外のレベルに設定を構成できます。サイトの最終的な構成では、web.configだけでなく、これらの他の親レベルの構成も使用されます。

これらのファイルをチェックして、これが間違っていると定義されているかどうかを確認してください<defaultDocument>

Server-level configuration is stored in the following configuration files:    
- Machine.config. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.    
- Root Web.config for the .NET Framework. This file is located in %windir%\Microsoft.NET\Framework\framework_version\CONFIG.    
- ApplicationHost.config. This file is located in %windir%\system32\inetsrv\config.

Site, application, and virtual and physical directory configuration can be stored in one of the following locations:    
- A server-level configuration file. When configuration for a site, application, directory, or URL is stored in a server-level configuration file, you must use a location tag to specify the site, application, directory, or URL to which the configuration applies.    
- A parent-level Web.config file. When configuration for an application, directory, or URL is stored in a parent-level configuration file, you must use a location tag to specify the child at which the configuration applies.     
- The Web.config file for the site, the application, or the directory. When you configure settings for an application, directory, or URL, the configuration is stored in the same directory as the site, application, or directory. You do not need to use location tags.

抽出元:IIS7での構成ファイルの操作

于 2012-07-15T23:12:47.090 に答える
0

何が問題になったのか正確にはわかりません-どこかで、どういうわけか、古いホームページがサーバーにキャッシュされていて、ページ自体が/WN-main.aspページにリダイレクトされていました...サーバーはすべきではありませんが何かをキャッシュしていて、最初はそれを何度もチェックしていました。たくさんの設定で遊んだ後、突然動作し始めました!Grrrマイクロソフト。aspと.netを無効にして有効にしたという事実は役に立ったかもしれませんが、よくわかりません...少なくとも今は機能しています!

于 2012-07-21T19:54:05.223 に答える