WordPressファイルの階層変更:.htaccess
公開日:2019年11月07日
WordPressファイルの階層を変更する際の「.htaccess」の変更箇所
ルートディレクトリ直下にフォルダを作成してWordPressファイルを配置した場合
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
ルートディレクトリの下にフォルダを作成してWordPressファイルを配置した場合
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /フォルダ名/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /フォルダ名/index.php [L]
</IfModule>
# END WordPress
同じカテゴリーのコンテンツ