0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

リダイレクト設定

Posted at

#配下を一括でリダイレクト設定する方法
意外と便利なので書き残しておきます

  1. 「フォルダ配下すべて」をリダイレクトしたい場合
    RedirectMatch または RewriteRule を使う
    【例】
    RedirectMatch 301 ^/xxx/010/010/(.*)$ https://www.example.jp/zzz/010/010/$1

リダイレクト先URLの$1は旧URLの(.*)$以下の構造を引き継ぐことができる。

2./xxx/010/010/配下のページをすべて1つのページに集約させたい場合は$1は必要ない。
【例】
RedirectMatch 301 ^/xxx/010/010/(.*)$ https://www.example.jp/zzz/010/010/index.html

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?