Apache/.htaccessのファイル名を変更する
の編集
Top
/
Apache
/
.htaccessのファイル名を変更する
[
トップ
] [
編集
|
差分
|
バックアップ
|
添付
|
リロード
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
-- 雛形とするページ --
(no template pages)
#navi(../) * .htaccessのファイル名を変更する [#x064e41d] .htaccessというファイル名を変更したい場合は、以下の設定により可能になります。 #contents #htmlinsertpcsp(web-top.html,web-sp.html) * 関連記事 [#m79edeaf] - [[.htaccessによる設定が反映するようにする>Apache/.htaccessによる設定が反映するようにする]] * 使用した環境 [#g427d479] - 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)" * .htaccessファイルをやめ別名のファイル名にする [#o374a75e] この資料では、.htaccessファイルを.htconfigに変更してみることにします。~ デフォルト値.htaccessファイル名を変更するには、AccessFileNameディレクティブ の設定値を.htconfigに変更することにより実現することができます。 httpd.confを確認すると、以下の記述があります。~ (OS, Apacheのバージョンによりhttpd.confが異なる場合があるかもしれません。) <省略> # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess <省略> 以下のようにAccessFileName .htaccessを.htconfigに修正します。 <省略> # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htconfig <省略> 以上、修正が完了したら''Apache(httpd)の再起動が必要''です。 #htmlinsertpcsp(web-btm.html,web-sp.html)
タイムスタンプを変更しない
#navi(../) * .htaccessのファイル名を変更する [#x064e41d] .htaccessというファイル名を変更したい場合は、以下の設定により可能になります。 #contents #htmlinsertpcsp(web-top.html,web-sp.html) * 関連記事 [#m79edeaf] - [[.htaccessによる設定が反映するようにする>Apache/.htaccessによる設定が反映するようにする]] * 使用した環境 [#g427d479] - 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)" * .htaccessファイルをやめ別名のファイル名にする [#o374a75e] この資料では、.htaccessファイルを.htconfigに変更してみることにします。~ デフォルト値.htaccessファイル名を変更するには、AccessFileNameディレクティブ の設定値を.htconfigに変更することにより実現することができます。 httpd.confを確認すると、以下の記述があります。~ (OS, Apacheのバージョンによりhttpd.confが異なる場合があるかもしれません。) <省略> # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess <省略> 以下のようにAccessFileName .htaccessを.htconfigに修正します。 <省略> # # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htconfig <省略> 以上、修正が完了したら''Apache(httpd)の再起動が必要''です。 #htmlinsertpcsp(web-btm.html,web-sp.html)
テキスト整形のルールを表示する