I want to make one website (running on a Raspberry Pi) and based on the link (for example: test.com/01 or test.com/02) the exact website should be opened, but with another picture. I want to avoid a database and I would like to work with pictures. Is it possible always to open the "index.html" website and get the numbers out of the link?
Asked
Active
Viewed 784 times
-2
-
2Go for it. We're not going to write it for you. – ceejayoz Aug 29 '16 at 20:28
-
2You shared your plans and preferences, but forgot to ask your questions. – PM 77-1 Aug 29 '16 at 20:28
-
You can just make 2 directories, whose html file has a simple background image. You can also make the images as 01.jpg and 02.jpg – John K Aug 29 '16 at 20:31
1 Answers
0
test.com/01
will take you to the 01 file. What you are trying to do is pass in key-value query parameters, and need a Query string like this test.com?picture=01
. You can even use the same HTML page and then choose the picture from the query string.
Since you want to avoid DBs, you can send both pictures and then hide the one that is not in the query string.
URLs are kinda complicated, check them out
-
1
-
Happy to help. I appreciate you accepted the answer, can I also get a sweet, sweet upvote? – James L. Aug 29 '16 at 20:49