Fix regex bug when main website url is set in config