
お世話になっております。
WordPressを設置しているサーバーにHTMLファイルを置き、
それを現在使用しているドメインにフォルダ名を付与する形で表示したいと考えています。
(WordPressの内容はhttp://example.comで表示し、http://example.com/html/でHTMLファイルを表示する形)
現在サーバーを下記のような形で運用しています。
/(サーバー直下)
├wp
├cgi-binなどシステム関連
└.htaccess
サーバー直下の.htaccessには下記のような内容が記入されており、
suPHP_ConfigPath /(サーバー名)/wp/ # 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>
wpフォルダ内の.htaccessには下記のような内容が記入されています。
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wp/index.php [L] </IfModule>
HTMLファイルやCSSなどはhtmlフォルダにまとめ、下記の場所にアップロードしております。
/(サーバー直下)
├wp
. ├WordPress関連のファイル・フォルダ
. └html
├cgi-binなどシステム関連
└.htaccess
WordPress内の.htaccessを下記のように変更し、
http://example.com/html/にアクセスすると表示されることは確認できたのですが、
http://example.comにアクセスしてもHTMLファイルの内容が表示されてしまいます。
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /wp/ RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /html/index.html http://example.com/html/ RewriteRule . /wp/index.php [L] </IfModule>
それぞれのURLで内容を分けて表示するにはどのようにすれば大丈夫でしょうか?
回答2件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。