EC-CUBE2.13で開発しています。
以下のURLだけBasic認証をかけたいです。
{ドメイン}/products/detail.php?product_id=2
{ドメイン}/products/detail.php?product_id=3
confファイルに以下を追加して対応はできたのですが、できればhtaccessで対応したいようで、ただLocationがhtaccessだと使えないのでうまくいきません。
htaccessでLocationの代替のようになるものがあれば教えてください。
apache
1RewriteEngine On 2RewriteCond %{QUERY_STRING} product_id=2 [OR] 3RewriteCond %{QUERY_STRING} product_id=3 4RewriteRule (.*) $1 [E=private_product:1] 5 6<Location /products/detail.php> 7 Order allow,deny 8 Allow from All 9 Deny from env=private_product 10 11 AuthUserFile /etc/httpd/conf/.htpasswd 12 AuthGroupFile /dev/null 13 AuthName "Administorator's Area" 14 AuthType Basic 15 require valid-user 16 17 Satisfy Any 18</Location>
Server version: Apache/2.4.6 (CentOS)
すみませんがよろしくお願いします。
回答1件
あなたの回答
tips
プレビュー