is there a definitive, more generic way to redirect from a www request to nowww than what's on WF documentation here: http://docs.webfaction.com/software/static.html#redirect-a-domain-with-a-static-cgi-php-app ? asked 14 Dec '10, 13:53 htrex |
yes! found here http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www maybe the docs could be enhanced too with this little magic definitive rule :) answered 14 Dec '10, 13:55 htrex It is hard to document .htaccess rules in depth since they are complex, It is easier to address them on a per-case basis.
(14 Dec '10, 14:38)
johns
Thanks htrex - was looking for this here.
(20 Dec '12, 03:35)
epqrs
|
Hi Team, I had similar issue so things didn't work with these codes earlier. I referred few notes from Richbeales.net's blog, and webfaction docs, and few other blogs too. Mostly I feel the issue is with providing followsymlinks Hence I recognize few things,so I followed this steps when trying to redirect www.example.com to example.com. Hope you get solution through this notes. In the control panel: Create a new application as "serverredirectedto, using "new Static/CGI/PHP-5.x" If you find www sites in any of the single sites you created earlier in "websites tab" in the webfaction control panel, remove the www domain from each of them Create a new website, call it "serverredirect", add ALL the www domains to it, and point it to the "serverredirectedto" application Save it SSH into your server, (Kindly read about SSH after this solution works to know more about it)
If someone doesn't yet know about SSH. It is Secure Shell. Secure way to log into to a remote machine which have a server software maintaining your apps and ssh provide you option to direct provide codes or applying changes without allowing others to check what you useful data. So open your terminal. And type and: cd /yourusername/webapps/serverredirectedto vi .htaccess
And save and exit If you want to reverse, per say example.com to www.example.com, do the opposite way by providing codes as
Have fun.. answered 12 Mar '14, 06:14 Rohith Kumar |