LoginSignup
26
15

More than 5 years have passed since last update.

MAMP環境で.htaccessファイルを有効にする方法

Posted at

MAMP環境で、WordPressを動かしていて、パーマリンクをデフォルトから数字ベースやカスタム構造に変えても、思うように表示ができず、悩むこと数時間・・・。

.htaccessファイルは存在するし、記述内容も問題はなさそうな状態でした。

もしやと思いapacheのconfファイルを確認してみたら、
.htaccessファイルでの上書き設定が無効になっていました(^^;

httpd.confに記述されている"AllowOverride"の値"none"を"All"に変更することで、.htaccessファイルの記述内容が有効になります。

/Applications/MAMP/conf/apache/httpd.conf

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories). 
#
# First, we configure the "default" to be a very restrictive set of 
# features.  
#
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All         ←"none"を"All"に変更
</Directory>
26
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
15