i have a website with this configuration:
CLOUDFRONT - origin www.example.com and example.com EC2 - xxxxx.ec2.amazonaws.com APACHE - running in ec2 ROUTE53 - A-RECORD example.com point to xxxxx.cloudfront.net and CNAME www.example.com point to xxxxx.cloudfront.net.
my website is answer, but apache identify as request URI the EC2 address (xxxxx.ec2.amazonaws.com) instead of "www.example.com" or "example.com", so all my website links points to "xxxxx.ec2.amazonaws.com/*"
i have tried rewrite inside apache using .htaccess as is:
RewriteCond %{HTTP:X-Forwarded-Proto} !https [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule .* http://www.example.com%{REQUEST_URI} [L,NE,R=301]
but when i put this configuration inside .htaccess, i get TOO MANY REDIRECTIONS.
someone can help me to solve this problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire