url rewriting - Amazon Route 53 setup and 301 Redirection setup -
i've setup site on amazon ec2 server. using route 53 , servers dns have propagated correctly when set them on godaddy. have few problems. @ end results want make 301 redirect www non-www (from www.domain.com domain.com). want redirection applicable paths (ie. www.domain.com/folder/ domain.com/folder).
in current configuration i've setup record domain.com point elastic ip address i've assigned server. when put domain.com (without www) in url works great , site loads. i've setup www.domain.com record point same ip address.
in iis7.5 i've set redirection rule (after i've installed "url rewrite" iis module.
here's rule:
request url: matches pattern using: wildcards pattern: (.*) logical grouping: match input {http_host} type: matches pattern pattern: www\.mydomainname.com\.com action type: redirect redirect url: mydomainname.com{r:1} redirect type: 301
when run site 'www' returns www.mydomain.com/mydomain.commydomain.commydomain.com ,etc...
i don't 'know if problem url rewrite, route 53 settings or both. want setup route 53 , redirection rules correctly site redirect www request non-www urls. furthermore, wanted know if it's practice use record both www , main domain in route 53.
update: removed rewrite rule still returns long url.
update2: created cname www , pointed public dns of ec2 server , www works. still need www non-www redirection rule.
thanks
in route53 set ptr(pointer) record go www.yoursite.com
yoursite.com
. use set redirection mydomain.com
www.mydomain.com
Comments
Post a Comment