So, I’ve come across an issue where some URL containing special symbols like parenthises, or plus signs, would change when refreshed, leading to a 404 page.
I’d like to specify that the URL is based on the title of the “product” page, and is automatically created.
Here is a link to an example. Click it, and it should work fine. But try hitting F5, and it will lead to a 404 page. You can see that the URL has changed, causing this to happen.
@jonatandor35 what do you mean? I want the URL to contain the title of the product, to make it look nicer and more transparent (rather than a series of numbers as a reference)
@tristan-breon-1 URLs have some limitations. for example they can’t contain spaces, And if the title contains “?” some browser may interpret it as query parameters. and if there’s a slash in the title, it might be interpreted as a url path, and if there’s a # in the title it might get interpreted as a url particle.
Therefore before creating the urls you should encode the title.
It’ll be uglier but that’s the way it works.
@jonatandor35 Oh okay got it. But how can I do that? That either means I can’t use symbols such as & / () in the title OR, not include the title of the item in the URL… I wish there was a way to automatically remove the special symbols.
@tristan-breon-1 When you create a dynamic page, Wix automatically creates an encoded URL. Check your database, and you’ll find there a greyed cloumn with this url.
For example:
If you have a title:
[CDAV]-Jeu-Cyberpunk-2077—Edition-Day-One-sur-PS4-/F-Xbox-One-(/20€-crédités)
The url will be:
/product/%5Bcdav%5D-jeu-cyberpunk-2077—edition-day-one-sur-ps4-%2Ff-xbox-one-(%2F20%E2%82%AC-cr%C3%A9dit%C3%A9s)