Without the patch when you have a "Default domain" set without a trailing slash you get
Notice: Undefined index: path in purl_subdomain->rewrite() (line 54 of DOCROOT/sites/all/modules/patched/purl/includes/purl_subdomain.inc).
If you add a trailing slash, then the rewritten paths contain an extra slash.
E.g.
http://BASE//content/test
To remedy this issue, but still allow the use of a path with the default domain. I purpose a check for the base path much the same as done for the port in the rewrite for subdomains.
$base_path = (!empty($base['path'])) ? $base['path'] : "";
$options['base_url'] = "{$base['scheme']}://{$element->value}.{$base['host']}{$port}{$base_path}";
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | pURL-subdomain_trailing_slash-1594626-1.patch | 743 bytes | grndlvl |
Comments
Comment #1
grndlvl commentedThe patch has been rolled against the 7.x-1.x branch.
Comment #1.0
grndlvl commentedadjust spacing
Comment #2
bblake commentedPatch has been committed. Thanks for the help.
Comment #3.0
(not verified) commentedformatting