diff --git a/playbooks/roles/codesearch/templates/codesearch.vhost.j2 b/playbooks/roles/codesearch/templates/codesearch.vhost.j2 index 17549fa59a..de70b25c7d 100644 --- a/playbooks/roles/codesearch/templates/codesearch.vhost.j2 +++ b/playbooks/roles/codesearch/templates/codesearch.vhost.j2 @@ -16,6 +16,9 @@ ServerName {{ inventory_hostname }} ServerAdmin webmaster@openstack.org + RewriteCond %{HTTP_HOST} !^codesearch\.opendev\.org [nocase] + RewriteRule ^/(.*) https://codesearch.opendev.org/$1 [last,redirect=permanent] + AllowEncodedSlashes On ErrorLog ${APACHE_LOG_DIR}/codesearch-ssl-error.log