Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It seems there is a bug in /http/Provision/Config/Apache/vhost.tpl.php
.
If you add an alias with the redirection flag set to true, it will redirect to true.com
.
elseif (!$ssl_redirection && $this->redirection) {
// Redirect all aliases to the main http url.
print " RewriteCond %{HTTP_HOST} !^{$this->redirection}$ [NC]\n";
print " RewriteRule ^/*(.*)$ http://{$this->redirection}/$1 [NE,L,R=301]\n";
}
$this->redirection
should be $this->uri
.
Comment | File | Size | Author |
---|---|---|---|
#1 | bad_redirect-2148671-1.patch | 1.46 KB | logaritmisk |
Comments
Comment #1
logaritmisk CreditAttribution: logaritmisk commentedComment #2
logaritmisk CreditAttribution: logaritmisk commentedComment #3
anarcat CreditAttribution: anarcat commentedI committed this, but in the future, please make sure your patch doesn't mix whitespace changes with regular changes.
Comment #5
lavamind CreditAttribution: lavamind commentedThe patch that was proposed and committed to fix this bug breaks the changes implemented previously to fix #1681904: Ability to configure a url to redirect to in site configuration.. As it stands, redirections to anything other than the main URI do not work in Apache.
Comment #6
lavamind CreditAttribution: lavamind commentedReverting changes to this issue, I just noticed #2189687: Redirect to site-alias not working had already been created.
Comment #7
helmo CreditAttribution: helmo commented@lavamind: Thanks for hinting on this.
@logaritmisk: You were probably missing the db update from: #2010064: Extra update hook to fix hosting_site_alias table content
I think I'll revert the commit from #3.
Comment #8
helmo CreditAttribution: helmo commented#3 reverted in both 7.x-3.x and 6.x-2.x