###ご質問
https://www.example.com/sample/?test_html&pageID=xx
https://www.example.com/sample/id=xx&more=1xxx
上記のようなURLで?test_htmlがつくURLとamp;moreがつくURLを全て
noindexにしたく、Apacheの設定ファイルで下記を設定 ⇒ restart ⇒
Chrome開発者ツールでヘッダー確認しましたが、X-Robots-Tagタグが
付与されず苦戦しております、正規表現方法もWEBの確認ツール
(https://weblabo.oscasierra.net/tools/regex/)では間違ってませんでした。
ご教示のほど、宜しくお願いいたします。
###環境
OS: CentOS Linux release 7.7.1908 (Core)
WEBミドルウェア:Apache/2.4.6 (CentOS)
###試した設定①
<Location "/.test_html/">
Header set X-Robots-Tag "noindex"
</Location>
<Location "/amp.more/">
Header set X-Robots-Tag "noindex"
</Location>
###試した内容②
<LocationMatch "/.test_html/">
Header set X-Robots-Tag "noindex"
</LocationMatch>
<LocationMatch "/amp.more/">
Header set X-Robots-Tag "noindex"
</LocationMatch>

回答1件
あなたの回答
tips
プレビュー