2011年06月14日 WordPress
なんともない話題ではありますが、既存のサイトを公開したまま、index.phpの方で、WordPressを入れて、リニューアルをと思ってたんですが、index.phpもindex.htmlもWordPressのホームディレクトリにリダイレクトされてるようです。 どうしたもんかと思ってたら、簡単に解決する方法がありました。 wp-include内のcanonical.phpファイルを開き、270行目付近にある、以下の一文をコメントアウトするだけです。
$redirect['path'] = preg_replace('|/index.php/*?$|', '/', $redirect['path']);

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

記事のタイトルを表示

2011年11月24日 WordPress
[php] <?php the_title(); ?> [/php]
「記事のタイトルを表示」をはてなブックマークに追加

wordpress カスタムフィールドの値で記事一覧取得、並び替え

2020年01月10日 WordPress
カスタムフィールドの条件が一つの場合 [php]<?php $args = array( 'posts_per_page' => -1, // 全件取得 'category' => array( 12,14 ), // カテゴリ 'meta_key' => 'finished', //カスタムフィールドのキー 'meta_value'…
「wordpress カスタムフィールドの値で記事一覧取得、並び替え」をはてなブックマークに追加

WordPressで特定の親カテゴリとその子カテゴリに所属する場合の条件分岐の方法

2022年11月12日 WordPress
functions.phpに以下を記述 [php]if ( ! function_exists( 'post_is_in_descendant_category' ) ) { function post_is_in_descendant_category( $cats, $_post = null ) { foreach ( (array) $cats as $c…
「WordPressで特定の親カテゴリとその子カテゴリに所属する場合の条件分岐の方法」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy