So on my website, I have several pages of content. On one of the pages, a forward slash is appended to my address bar even if I point my browser to example.com/guides
thus leaving me with example.com/guides/
. To be clear, this page loads perfectly fine. When I point my address bar to example.com/about
, it leaves the url as is and loads the page. When I visit example.com/about/
it loads the same page and the forward slash is left to be. Here is the code from how my server handles these get requests:
app.get('/about', (req, res) => {
res.sendFile(__dirname + '/views/about.html');
});
app.get('/guides', (req, res) => {
res.sendFile(__dirname + '/views/guides.html');
});
As you can see, both html files are rendered the exact same way. I have no JavaScript on either of the two pages, and I am not loading any external libraries on either of the pages. This guides page is the only one with this behavior. There are also no errors in the console or my server logs. Thank you in advance.
EDIT:
After examining the network page in my developer console, it returns 301 Moved Permanently (from disk cache)
for the GET request status code.