0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

/-/ というハイフンを含むURL

Last updated at Posted at 2019-10-25

週刊誌などのニュースサイトのURLを見ると

https://{ドメイン}/articles/-/XXXXXX
というようなURLを見かける。

1つのニュースサイトだけでなく、ちらほらと別のニュースサイトでも見かけるのが、パス中(ディレクトリ名)に-を使っていること。

記事を見てると分かるが、例としてURLを上げると

https://toyokeizai.net/articles/-/307139

https://toyokeizai.net/articles/comment/307139

というようにハイフンのパスは、記事のコメントのページを示すURLに変形することができる。

推測だが、ディレクトリの階層を同じにすることで管理しやすくするためだと思われる。

コメントのページだけではなく、画像プレビューページやプリント用ページのパスにもなる。

https://www.jprime.jp/articles/photo/16250

https://president.jp/articles/print/28421

モバイル端末向けページ(AMP)のパスもある。

https://gendai.ismedia.jp/articles/amp/50183

閑話

ちなみに

https://www.jprime.jp/articles/photo/16250
https://www.afpbb.com/articles/-/3171249?pid=20032237

とかの記事にある写真のURLは

https://jprime.ismcdn.jp/mwimgs/3/a/-/img_3a0617b530873257d1d11636eaf4657d569852.jpg
https://afpbb.ismcdn.jp/mwimgs/6/8/80h/img_6896a0067eb1185ef27c708f1399b5b273807.jpg

という風に違う出版社なのにURLが似ているということ。

\def\textsmall#1{%
  {\rm\scriptsize #1}
}

$\textsmall{(/3/a/-/のハイフンは何かというと、サムネのパスになるらしい}$
$\textsmall{//jprime.ismcdn.jp/mwimgs/3/a/226/img_3a0617b530873257d1d11636eaf4657d569852.jpg}$
$\textsmall{。)}$


大抵の日本向けの出版社のニュースサイトは「Japan Business Press Co., Ltd.」のサイト運用システムを使っていると推測。

記事とコメントページのパス 他のサイトの例

amazonの場合

商品ページ
https://www.amazon.co.jp/dp/B00GNPUKCY

レビューページ
https://www.amazon.co.jp/gp/customer-reviews/REHELFAMZMEFX

そのレビューの常設リンク
https://www.amazon.co.jp/review/REHELFAMZMEFX

0
1
0

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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?