問題タブ [windows-hosting]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
html - サブディレクトリの URL の末尾のスラッシュの問題
現在、1 つのホストを使用して複数のドメインをホストしています (各ドメインはルート ディレクトリ内のフォルダーを指しています)。通常は問題なく動作しますが、ドメインのサブディレクトリにアクセスしようとすると問題が発生します。
たとえば、このように指定されているドメインexample.comがあります
example.com は \folder\abc\ を指します
https://example.comは正常に 動作し
ます https://example.com/xyz/は正常に動作します。xyz は abc フォルダーのサブディレクトリです。
https://example.com/xyzは https://example.com/folder/abc/xyz/にリダイレクトされます
.htaccess ファイルまたは web.config で、末尾にスラッシュがない URL が別の方法でポイントするこの問題を修正するために何かする必要がありますか?
--
更新:
.htaccess ルールは次のようになります。