We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Underscores in URLs ? | Forum

OW-Ghost
OW-Ghost Apr 27 '16
I have many members that use underscores in they usernames and then my profile urls will bee created with underscores??


How can i stop this? i want SEO friendly URLs with no underscores


Marcus

Anitaku
Anitaku Apr 27 '16
urls with underscores aren't harmful on SEO..
Anitaku
Anitaku Apr 27 '16
in fact, its probably more SEO friendly than having a bunch of words crammed together
ross Team
ross Apr 28 '16
You can do that via reg exp which validates the username when the user fills it out 

You can do that in the ow_utilities/validator.php file. 

ross Team
ross Apr 28 '16
Topic was moved from General Questions.
OW-Ghost
OW-Ghost Apr 28 '16
i see this code in the ow_utilities/validator.php file  but dont know what i should change in it?


can you explain?

  const URL_PATTERN = '/^(http(s)?:\/\/)?((\d+\.\d+\.\d+\.\d+)|(([\w-]+\.)+([a-z,A-Z][\w-]*)))(:[1-9][0-9]*)?(\/?([\w-.\,\/:%+@&*=~]+[\w- \,.\/?:%+@&=*|]*)?)?(#(.*))?$/';

OW-Ghost
OW-Ghost Apr 28 '16
const USER_NAME_PATTERN = '/^[\w]{1,32}$/';