###前提・実現したいこと
下記のようにリダイレクトされるように設定しようと思っています。
http://hogehoge.com/page/2 -> http://hogehoge.com/item/page/2
http://hogehoge.com/page/3 -> http://hogehoge.com/item/page/3
###発生している問題・エラーメッセージ
.htaccessに記載したものの、リダイレクトがうまくいっていません。
###該当のソースコード(.htaccess)
php
1RewriteEngine On 2RewriteCond %{HTTP_HOST} ^www\.hogehoge\.com 3RewriteRule (.*) http://hogehoge.com/$1 [R=301,L] 4 5RewriteRule ^hogehoge.com/page/(.*)$ http://hogehoge.com/item/page/$1 [R=301,L] 6 7# BEGIN WordPress 8<IfModule mod_rewrite.c> 9RewriteEngine On 10RewriteBase / 11RewriteRule ^index\.php$ - [L] 12RewriteCond %{REQUEST_FILENAME} !-f 13RewriteCond %{REQUEST_FILENAME} !-d 14RewriteRule . /index.php [L] 15</IfModule> 16# END WordPress
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/03/23 12:01