.htacessのリダイレクトの描き方
秀丸やテラパッドなどのテキストエディタで.htacessを作成します。
ファイルを開いたら以下のソースを書き込む。
.htacessの記述
***************
Redirect permanent (半角スペース) 転送前URL (半角スペース) 転送先URL
***************
/mobile/index.htmlにアクセスしたユーザーは、
http://frogsnote.blog.fc2.com/list.htmlに転送されます。
Redirect permanent /mobile/index.html http://frogsnote.blog.fc2.com/list.html
/mobileディレクトリ以下のページにアクセスした場合、
http://frogsnote.blog.fc2.com/以下の同じファイル名に転送します。
Redirect permanent /mobile http://frogsnote.blog.fc2.com/
ファイルを開いたら以下のソースを書き込む。
.htacessの記述
***************
Redirect permanent (半角スペース) 転送前URL (半角スペース) 転送先URL
***************
/mobile/index.htmlにアクセスしたユーザーは、
http://frogsnote.blog.fc2.com/list.htmlに転送されます。
Redirect permanent /mobile/index.html http://frogsnote.blog.fc2.com/list.html
/mobileディレクトリ以下のページにアクセスした場合、
http://frogsnote.blog.fc2.com/以下の同じファイル名に転送します。
Redirect permanent /mobile http://frogsnote.blog.fc2.com/
コメント
コメントの投稿
トラックバック
http://frogsnote.blog.fc2.com/tb.php/21-80c5deb2