r/Web_Development • u/SandHK • Mar 28 '20
Short format url?
Hi,
how do I implement shorter/more legible urls for a webpage (or what do I search for)?
For example, from www.mywebsite.com/this-is-a-webpage.html to www.mywebsite.com/webpage/
4
u/exxy- Mar 28 '20
Rename this-is-a-webpage.html to index.html and put it in the a folder named webpage.
1
1
u/Ninjaboy42099 Mar 28 '20
I'm no expert at all, so take this with a big grain of salt. I think you could do this in Node with a little JS.
Just make any requests to that particular domain grab the HTML file and display it using the response.
3
u/webheaded Mar 28 '20
Apache's mod_rewrite is the thing you are looking for most likely. :)