https://teratail.com/questions/110711
上記の質問・回答を見て、PLESKでのパーマリンク変更設定がうまくいきました。ありがとうございます。
タイトルにある通りなのですが、これが複数サイトになった場合の記述方法がわからなくて困っています。
マルチサイト設定をしているわけではなく、単純に二つのwordopressを一つのドメインにインストールした場合です。
http://www.example.com/main/
http://www.example.com/blog/
このような構成の場合、下記の記述をした際、
if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {
rewrite ^/(.*)$ /index.php?$1;
}
http://www.example.com/main/の方のパーマリンクには飛ぶのですが、
http://www.example.com/blog/のパーマリンクがhttp://www.example.com/main/に飛んでしまいます。
説明が下手で申し訳ないのですが、どなたか教えていただければ幸いです。
※PLESKの公式サイトでは、下記のような記述があったので試してみましたが、片方のパーマリンクしか機能しませんでした。
If a WordPress installation is located in a subdirectory (for example, "httpdocs/sub-dir") or this is a WordPress multisite network based on subdirectories, add the /sub-dir/ before /index.php?$1 so it will look like this: rewrite ^/(.*)$ /sub-dir/index.php?$1; Note: For WordPress multisite network based on subdirectories, add the above rule for each subdirectory.
あなたの回答
tips
プレビュー