Issue
I’m trying to make a website, however, I cannot seem to figure out how to make pages' URLs be like "website.com/home" and not "website.com/home.html" or "...index.html".
In the URL bar, it shows either summ.ga/index.html. How can I make it summ.ga/home?
Solution
summ.ga/
├── index.html
├── test.html
├── home/
│ ├─ index.html
│ ├─ bio/
│ │ └─ index.html
│ ├─ images/
│ │ └─ random.jpg
│ └─ styles/
└── static/
You need to understand how the folder structure and file extensions translate to URL strings. See the sample tree structure above. In short, create a /home
directory and place an index.html
inside. Should you want to automatically redirect summ.ga
to summ.ga/home/
you'd need to write a little bit of either server-side or client-side code.
Answered By - Bumhan Yu
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.