function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ken KoellnerKen Koellner 

Any way to get a case-insenstive URL or indirect?

We have a sites URL  Some users are trying to access and they are getting thrown to a generic page not found.


I could put in a redirect from to but that would work only for that one specific case.  If a user tried they would still get a page not found.


Is there any way to make a sites URL case insensitive or have some sort of case-insenstitve redirect?



     I think SiteURL parameter is case insensitive in salesforce ,if you append the visual force page name with site url in lower case or in upper case,it does not matter, it would not show the "Genric Page not found Error". The cause of the error may be due to some other factor, if you can elaborate a bit more we might be able to resolve the issue faced by you.







Ken KoellnerKen Koellner

Not sure how could eleborate much further.  The problem is exactly what I said it was.  I changed some names for security reasons but the names are totally analogous to the real names.  The VF page isn't part of the URL.  When the user asks for the site in uppercase it works.  When the user asks for the URL in lower case, it does not.




You would have to add in either apex or javascript re-directs depending on how complicated you wanted to get.

If you ensure all of your pages are lowercase you could parse the url and redirect to a lowercase url.


I've seen this issue before and I ended up putting javascript redirect to do this same thing.


Good Luck!

I'm having the same issue. Does anyone have the code (javascript or Apex) to make/redirect the URL all lowercase?  And then have the site page be all lowercase too.  Tried URL Rewriter Class but didnt seem to redirect either.
Magesh Mani YadavMagesh Mani Yadav
Hi Ken  & Jason

There is a feature in salesforce where you can add url redirects
Got to the Site detail page there is a button called "URL Redirects" where you can add all posible redirects.
eg: In the Source URL add the relative URL as "/xyzzy" and select redirect type as permanent and at the destination add full or relative URL "/XYZZY"
Hope this solves your issue