5 ms·
You're selling a redirect rule...? RewriteEngine on RewriteCond %{HTTP_HOST} ^example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
by clone1018 15y ago
You're selling a redirect rule...?
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
- 1880 15y agoNot only that, you have to point your domain to his nameservers. That looks risky.
- tstegart 15y agoSo how do you do this on your own?
- 1880 15y agoOne can use the rule that clone1018 posted, for example.
- tstegart 15y agoSo, separate question, since apparently I have a bunch of people here who understand this: I need to track link clicks made on advertisements in our iPad app. I can't do it from the app because 1) our backend is open source, and they're not implementing that and 2) I don't know how anyways. So I thought of using redirects. The link in the app goes to our site and gets redirected to the advertiser's site. That way I can track it with Google analytics and since i understand that, everything is peachy. Therefore, the questions are: 1) is this an acceptable practice? and 2) is there a better, easier way that I'm unaware of?
- MoOmer 15y agoA little more background on it for you here: http://www.seomoz.org/learn-seo/redirection http://www.seomoz.org/learn-seo/redirection
- zacharyb 15y agohttps://www.google.com/search?ix=aca&sourceid=chrome&ie=UTF-8&q=root+to+www+redirect https://www.google.com/search?ix=aca&sourceid=chrome&...
- tstegart 15y agoThanks! Our web hosting (NearlyFreeSpeech.NET) had a button I could click and it did it automatically.
- mleonhard 15y agoYes, hosted on geo-redundant servers, in excellent data centers, monitored 24/7. You can't use a CNAME record for your root domain. This is a problem for me and lots of folks who run their web servers behind Amazon Elastic Load Balancers or other CNAME-based services. RootRedirect solves the problem nicely.
- tstegart 15y ago+1 for showing up to reply. I like it.
- byoung2 15y agoThis is a problem for me and lots of folks who run their web servers behind Amazon Elastic Load Balancers Amazon Route 53 solves this problem with an alias record, though your service may be easier to use or cheaper than what Amazon offers. http://aws.amazon.com/route53/faqs/#Zone_apex http://aws.amazon.com/route53/faqs/#Zone_apex
- deleted 15y ago[deleted]
- 1SaltwaterC 15y agoActually we can, but that's a professional DNS service that includes other stuff besides DNS. But when we used CNAME for the root, some email services stopped working. They were trying to send the email to the CNAME resolved address which was the ELB itself. Did you find a solution for that?
- rgrieselhuber 15y agoGotta admire the pluck.
- mark242 15y agoOr for you nginx users... server { server_name example.com; rewrite ^ http://www.example.com$request_uri? permanent; }