I've noticed just recently that you may have changed your parsing method for the path after "opts-slash".
Before something like this worked.
sites.google.com.opts-slash.example.com.opts-slash.sub-path
=> sites.google.com/example.com/sub-path
But now this
=> sites.google.com.com/example/sub-path
My guess is you aren't grabbing things between the .opts-slash
Perhaps this?
Do this before to get rid of the FQDNhostname = hostname.replace(new RegExp(.${config.fqdn}+ '$'), '')
Then do your status code parsing
Then do your slash parsing using an exec reg exp
re = /(\.(?:opts-)?slash\.)(.*?)(?:(?:\.(?:opts-)?slash\.)|$)/ig
r = re.exec(hostname)
while(r) {
hostname = hostname.replace(`${r[1]}${r[2]}`, "")
options.slashs.push(r[2])
this.logger.info(`${path} ${hostname} without ${r[1]}.${r[2]}`)
re.lastIndex = 0 // To reset exec
r = re.exec(hostname)
}
@kenttregenza I'm sorry for this mistake. I released a new version of redirect.center in javascript yesterday. I changed the code parsing and now is working fine. Thanks
I've noticed just recently that you may have changed your parsing method for the path after "opts-slash". Before something like this worked. sites.google.com.opts-slash.example.com.opts-slash.sub-path
=> sites.google.com/example.com/sub-path
But now this => sites.google.com.com/example/sub-path
My guess is you aren't grabbing things between the .opts-slash
Perhaps this?
Do this before to get rid of the FQDN
hostname = hostname.replace(new RegExp(
.${config.fqdn}+ '$'), '')
Then do your status code parsing
Then do your slash parsing using an exec reg exp
This matches both .slash. and .opts-slash.