0

I have seen an interesting feature on a website which I would like to copy but have no idea how this was done. I would appreciate a lot any help to guide me in the right direction I should look at.

It was possible to load an image with different urls.

As an example:

www.domain.com/images/900105/
www.domain.com/images/900105/image_name.jpg
www.domain.com/images/900105/other_image_name.jpg

All the above links would load the same image. Also the url did not change in the browser why it did not seem to be a redirect to me. To my understanding there must be only one image in the folder 900105. Everything after the "/" which comes after the folder "900105" does not have any impact.

Could someone please give me a hint.

Thank you

user3358102
  • 189
  • 1
  • 14
  • URLs don't need to have any relationship to files on disk at all - they might just be entries in a database. So in this case, "900105" probably doesn't refer to a folder; it might refer to a file called "900105.jpg", or it might just be an ID to be looked up somewhere else. The most common way to configure how a web server interprets URLs in order to make "pretty" URLs like this work is using "rewrite rules", as described at the linked duplicate. – IMSoP May 31 '22 at 21:52

0 Answers0