URLs to .html without trailing slash and redirect
See original GitHub issueI have some routes that are pretending directly pointing to html files:
routes: [
...
'pages/1.html',
'pages/2.html',
...
]
and prerender-spa-plugin
produces directory structure as:
pages/
└─1.html/
└─index.html
└─2.html/
└─index.html
The problem is that most of static web servers with such structure will issue a redirect from pages/1.html
to pages/1.html/
. Is there a way to specify output file per route to get structure like this?
pages/
└─1.html
└─2.html
Issue Analytics
- State:
- Created 5 years ago
- Comments:11
Top Results From Across the Web
Should You Have a Trailing Slash at the End of URLs? - Ahrefs
A trailing slash is a forward slash (“/”) placed at the end of a URL such as domain.com/ or domain.com/page/. But should you...
Read more >To slash or not to slash | Google Search Central Blog
This behavior is beneficial because it reduces duplicate content. In the particular case of redirects to trailing slash URLs, our search results will...
Read more >Trailing Slashes on URLs: Contentious or Settled? | CSS-Tricks
You can enable uglyURLs = true and redirect all “*.html” ugly URLS to the correct paths (without trailing slashes or .html ) but...
Read more >URLs Without Trailing Slash or Extension (Nginx, Apache)
I prefer URLs without a trailing slash or an extension when they are pointing to pure html content. They get the information across...
Read more >301 redirect urls with trailing slash to urls ... - Stack Overflow
Right -- if you request just the host with no path, the browser appends '/', so you end up with an infinite redirect....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm, good idea. Perhaps I could add some logic to avoid outputting routes if there is a file extension on the route?
Works perfectly! 👍