2 Risposte
- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
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!
con risposta 3 mesi fa
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>
Contenuto pertinente
- AWS UFFICIALEAggiornata 9 mesi fa
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata un anno fa
- AWS UFFICIALEAggiornata un anno fa
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?