dns - Redirecting or rewriting non-www/wildcard to www.domain.com -


i want redirect non www thats domain.com www.domain.com. know there lot of people had posted same question here. went through of them, realized case little different. running e-commerce application on aws ec2 instances load balancer on , dns parked in route 53. integrated akamai had change cname , change domain name domain.com www.domain.com can serve our customers via akamai. problem facing unable redirect domain.com www.domain.com. since route53 doesnt not 301 redirection, re-parked our domain godaddy, has got domain forwarding feature. tried redirect using domain forwarding also, seems not helping enough.

presently using wwwzier.com redirect traffic, planning have .htaccess. since commerce between , site expected load faster cant have server level redirection or rewrite.

what other ways achieve same.

do kindly me since fighting fire since week now.

thanks lot.

what did setup micro instance apache running. micro instances free year. opened port 80 directly in security group. assigned elastic ip it. pointed records domain(s) ip. micro instance picked amazon linux ami think. sshed in , put following .htaccess in /var/www.

/var/www default web page apache server that's been setup.

rewriteengine on rewritecond %{http_host} !^www\. rewriterule ^(.*)$ http://www.%{http_host}/$1 [r=301,l] 

this redirects whatever.com www.whatever.com equivalent.

so domain want redirect www can set record domain elastic ip of micro instance , htaccess redirect through www version cname pointing elb can take effect.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -