2 Antworten
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
1
After playing around with it, I was able to get a successful redirect by editing opt/bitnami/apache/conf/vhosts/00_status-vhost.conf
with your above code:
Define CUSTOM_DOMAIN_NAME "example.com"
RewriteEngine On
<VirtualHost *:80 *:443>
ServerName www.example.com
RewriteRule ^/(.*) https://${CUSTOM_DOMAIN_NAME}/$1 [R=301,L]
</VirtualHost>
All seems to be working now! Thank you!
beantwortet vor 3 Monaten
1
Hello.
Can I redirect if I configure Apache as below?(After making the settings, restart Apache.)
Define CUSTOM_DOMAIN_NAME "example.com"
RewriteEngine On
<VirtualHost *:80 *:443>
ServerName www.example.com
RewriteRule ^/(.*) https://${CUSTOM_DOMAIN_NAME}/$1 [R=301,L]
</VirtualHost>
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor 3 Jahren
- AWS OFFICIALAktualisiert vor 9 Monaten
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor einem Jahr
Thanks for the suggestion, but unfortunately, it doesn't seem to have worked.
I edited this file
/opt/bitnami/apache/conf/httpd.conf
and added the virtual host code (after swapping out my domain for example.com), saved the file, restarted Apache, reset my CloudFront cache too for good measure, and no luck. I've tried from multiple browsers/computers too, double checked for redirects using a 3rd party, and no dice.Is that the correct file?