robots.txtでディレクトリ全体を禁止するにはどうすればよいですか?
この質問は、ウェブマスターStack Exchangeで回答できるため、Stack Overflowから移行されました。 8年前に移行され ました。 現在作業中の2つのサイトは、ショッピングカートと買い物客です。両方が同じドメイン名の下にあるので、例えば http://example.com/first_url http://example.com/second_url これらのURLは両方とも、その下に大量のページがあります http://example.com/first_url/product1 http://example.com/first_url/product2 http://example.com/first_url/product3 http://example.com/second_url/product1 http://example.com/second_url/product2 http://example.com/second_url/product3 どのように私は、メインのURLを禁止します/first_urlし、/second_urlあまりにも、すべてのサブページやサブディレクトリ?私はこのようなことを考えていましたが、これが機能するかどうか、それが正しい構文であったかどうかはわかりません Disallow: /first_url/*/ Disallow: /second_url/*/