CMS Development

LWardell
Mitglied

Flexible Pattern for Case Sensitive URL Redirection

As it currently stands, URLs for the website I'm working on resolve with both upper and lower case characters. I would like to redirect a URL to all lower-case if someone attempts to use a version of the URL containing an uppercase char.

 

Example:

https://www.getmarvia.com/digital-asset-managemenT

 

Should redirect to:

https://www.getmarvia.com/digital-asset-management

 

I am not sure if flexible patterns would allow for this but I haven't been able to find a way to make it work. Any suggestions are greatly appreciated. 

0 Upvotes
3 Antworten
Ntbrown
Mitwirkender/Mitwirkende

Flexible Pattern for Case Sensitive URL Redirection

@webdew  That's not what was being asked... They explictly mentioned they already knew this and were asking about the ability to do case matching + redirection.

@LWardell To answer your question.... No, you'd need a regex / rewrite rules to be able to do this. In other words, you have flexibility, but not enough.

 

If someone can point out how to do this I'll have learned something new, but I don't believe it's possible. In my experience anything of actual value tends to be lacking within HubSpot, so I have a fair amount of confidence that statement is correct, but you never know.

 

If you really wanted to.... Sure, JavaScript, but this is server level stuff.

 

Per @dennisedson  point... If your issue is linking rather than discovery you can fix that at the template level.

webdew
Ratgeber/-in | Diamond Partner
Ratgeber/-in | Diamond Partner

Flexible Pattern for Case Sensitive URL Redirection

Hi @LWardell 

With the URL redirects tool, you can redirect traffic from any URL on a HubSpot-hosted domain to any other URL. please refer to this documentation. 
https://knowledge.hubspot.com/domains-and-urls/create-and-manage-url-redirects

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Flexible Pattern for Case Sensitive URL Redirection

@LWardell 

Is this a problem you are seeing on your site? 

I would consider using a the Hubl Lower filter, but maybe you have a different issue 🤔

@Kevin-C any thoughts?

0 Upvotes