Frank Vèssia Posted March 6, 2020 Share Posted March 6, 2020 as per client need I have to implement some special urls with upper case characters, is there a way to do it? Thanks Link to comment Share on other sites More sharing options...
MoritzLost Posted March 6, 2020 Share Posted March 6, 2020 You can allow UTF8 characters in page names, or extend the default to allow for uppercase letters through the configuration. You need to update two config settings to tell ProcessWire to allow UTF8 page names and whitelist the characters you want to use, as well as update your .htaccess file to route those URLs to ProcessWire. This blog post has a detailed tutorial. I haven't tested this, but if you only want to allow uppercase letters (and no UTF8 characters), it should be enough to add the uppercase letters to $config->pageNameWhitelist. The default .htaccess routing rule already includes A-Z characters, and uppercase letters are ASCII anyway ... 2 Link to comment Share on other sites More sharing options...
adrian Posted March 6, 2020 Share Posted March 6, 2020 Can I suggest that a better tactic would be to convince the client the uppercase characters are a bad idea ? It may or may not be an SEO issue: https://www.searchenginejournal.com/url-capitalization-seo/343369/ There is of course the issue that Linux vs Windows work differently in this regard with windows servers treating uppercase and lowercase as the same URL while linux treat them as different. Not that I expect the site will move to a Windows server in the future, but something to be aware of. But mostly I think it just looks ugly ? 1 Link to comment Share on other sites More sharing options...
Frank Vèssia Posted March 6, 2020 Author Share Posted March 6, 2020 thanks @MoritzLost@adrian I know uppercase chars are bad but unfortunately the client wants few urls in that way as per documentation that I cannot change or discuss... can't do anything about it... 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now