Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PrettyUrls settings appears to be the wrong way around

See original GitHub issue

The 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:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

ohuucommented, Oct 25, 2022

Ahh, that’s how it works! Thanks I got it working now.

ElMassimocommented, Oct 25, 2022

As specified in the documentation for prettyUrls:

Whether to skip .html and trailing slashes in link hrefs and router paths.

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found