home

 service
  y比較
  ychobiプラン
   yサービス
   y申込
   y禁止事項
  yfreeプラン
   yサービス
   y申込
   y禁止事項

 support
  yよくある質問
  yサポート掲示板
  yユーザ専用ページ
   ychobiプラン
   yfreeプラン
  yサーバ情報
   y障害メンテ
  ychobi日記
  yLINEオープンチャット
   サポート

 link

 contact


 新規投稿 | ツリー | スレッド | タイトル | 一覧 | 検索 | ログ | 設定 


-.htaccessについて [ころらど] (09/19 13:59)
 └Re:.htaccessについて [管理人] (09/19 14:49)
  └Re:.htaccessについて [ころらど] (09/19 18:05)

[3500] .htaccessについて
Name: ころらど E-MAIL
Date: 09/19 13:59
いつもお世話になっております。特定のURLからの接続を防ぐために.htaccessを導入したいのですが、何度やっても500エラーが出てしまいます。
「よく使うhtaccess」という支援サイト様のツールを利用して作成したのですが、どうすれば正常に動くようになるでしょうか。

以下はサンプルそのままのURLを拒否してみたときの結果です。


**.htaccessの内容(文字コード:UFT-8)**

# AccessControl referer
SetEnvIf Referer "^http://example\.ne\.jp" chk_url
SetEnvIf Referer "^https://example\.ne\.jp" chk_url

order allow,deny
allow from all
deny from env=chk_url


**エラー内容**

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at kanri@chobi.net to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

****

色々調べてはみたのですが、どうしても原因が分かりません。お手数ですが解決方法をご教授いただけると助かります。


また、本題とは無関係ですが……以前IDの変更をお願いしたとき、素早く対応していただけて助かりました。その節はありがとうございました。
自分の求める要素が全て詰まったサーバーをお借りできて、とても有り難いです。これからも末永くよろしくおねがいします。

返信する


[3501] Re:.htaccessについて
Name: 管理人
Date: 09/19 14:49
Apache 2.4 ベースの記事で探して設定してみてください。

(htaccessはAuthconfig と limit のみ許可です。)

返信する


[3502] Re:.htaccessについて
Name: ころらど E-MAIL
Date: 09/19 18:05
お早い回答ありがとうございます。頂いたキーワードで調べた末、以下のように記述して無事に適用することができました。
本当に助かりました。ありがとうございます。


***

AuthUserFile /home/ユーザー名/.htpasswd

<RequireAll>
Require all granted
<RequireNone>
Require host (拒否したいアドレス)
</RequireNone>
</RequireAll>

返信する

レッツPHP!




Since 2002 0701 Copyright chobi net all rights reserved