PrettyUrls settings appears to be the wrong way around
See original GitHub issueThe prettyUrls
setting appears to be the wrong way around. I would expect routes to be like this .../products/index.html
when prettyUrls
is set to true
. However the routes appear like this .../products.html
which requires one to explicitly include .html
at the end of the url
It might just be me but that seems to be the opposite of what you want?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
fix paths with pretty urls? - php - Stack Overflow
Basically when I learned how to use the URI instead of a URL and route everything through a index.php and a router script....
Read more >Pretty URLs, mod-rewrite problems - concrete5 - Concrete CMS
Installation went fine, and everything is working like a charm, except for the SEO friendly URL's feature. When I activate that setting, ...
Read more >Enable clean URLs - Drupal
Enable clean URLs for better search engine indexing and make user friendly URLs.
Read more >The Ultimate Guide to Using WordPress Permalinks - Kinsta
WordPress permalinks can be unwieldy by default. Learn how to set up pretty permalinks that will boost your SEO rankings and UX.
Read more >Manage Your Public Profile URL | LinkedIn Help
You'll be redirected to the Public profile settings page. Under Edit your custom URL on the right side, click the Edit icon next...
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
Ahh, that’s how it works! Thanks I got it working now.
As specified in the documentation for
prettyUrls
:With
prettyUrls: false
, links will be normalized to ensure a “standard” server can serve the corresponding HTML page. For example, the canonical for/products/1/index.html
is/products/1/
, while the only valid URL for/products/1.html
is/products/1.html
.With
prettyUrls: true
, you rely on service providers to route things differently than “standard” servers. As a result, you can safely use/products/1
as a shortcut for/products/1.html
, as the service provider would be able to route it correctly.Seems like DigitalOcean does not support this feature, so you would need to use
prettyUrls: false
to ensure links are not broken.îles won’t change the structure of your HTML site, if you want
/products/1/index.html
instead of/products/1.html
, change the structure of the pages accordingly. For example,src/pages/products/[page]/index.vue
.