#navi(../)
* .htaccessによる設定が反映するようにする [#sfb1c448]
.htaccessに設定を記述したのに反映されない場合は、.htaccessの読み込みをするように設定していない可能性があります。~
以下、.htaccessに記述した設定を読み込むようにする設定を記述します。~

#contents
#htmlinsertpcsp(web-top.html,web-sp.html)

* 関連記事 [#l54807c0]
- [[.htaccessのファイル名を変更する>Apache/.htaccessのファイル名を変更する]]
-[[Apacheでページが移動したことを示すステータスコード301の設定方法>Apache/ページが移動したことを示すステータスコード301の設定方法]]

* 使用した環境 [#pb168d36]
- Apache(httpd)
 # httpd -v
 Server version: Apache/2.2.3
 Server built:   Feb 23 2012 21:16:56
- OS
 # lsb_release -sd
 "CentOS release 5.8 (Final)"

* httpd.confを確認(apache2.confとなっている場合もあります) [#m4650975]
httpd.confを確認すると、以下の記述があります。~
(OS, Apacheのバージョンによりhttpd.confが異なる場合があるかもしれません。)
 # This should be changed to whatever you set DocumentRoot to.
 #
 <Directory "/var/www/html">
 <省略>
 # AllowOverride controls what directives may be placed in .htaccess files.
 # It can be "All", "None", or any combination of the keywords:
 #   Options FileInfo AuthConfig Limit
 #
    AllowOverride None
上記に記述されているように、AllowOverride NoneのNoneをAllに変更すれば.htaccessファイルを読み込むようになります。

* httpd.confを修正(AllowOverride Allに変更) [#d85c7adb]
 <省略>
 # AllowOverride controls what directives may be placed in .htaccess files.
 # It can be "All", "None", or any combination of the keywords:
 #   Options FileInfo AuthConfig Limit
 #
    AllowOverride All

AllowOverride Allに修正し設定ファイルを保存したら、''Apache(httpd)の再起動が必要''です。


#htmlinsertpcsp(web-btm.html,web-sp.html)

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS