Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi all,
I have a droplet that seems to be stuck in a redirect loop for no apparent reason. My client wanted all traffic to point to a www address rather than the non www address which was fine until I tried to do the redirect using my apache config.
Redirect permanent / http://www.mysite.com/
After adding that line to the config and reloading apache it made the page return a redirect loop. I promptly removed this from the file and restarted apache but still a loop appears. I delved further into the problem and found these lines in my .htaccess file:
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{SERVER_ADDR} !=127.0.0.1
RewriteCond %{SERVER_ADDR} !=::1
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
I also removed these from the file and still there was a loop. I created a new htaccess file that doesnt contain these lines at all and still there is a loop. I cannot see any configuration anywhere that will be causing a redirect. Is there anywhere I can look on the server to find more information about it or something I am missing that jumps out to anyone. The site in question is just hand built php so not running on wordpress or any kind of CMS.
It was setup before I started working on it so there may be things that I have missed but I know that it is running PHP5-FPM and Apache2.
Any help or advice would be greatly appreciated.
Thanks,
gerard
Jon Harris
orbitstorm88
rem3n
yolanda smith
301276acdc124dd982fe86364ba8c4
30ddab6038c044188d489290785dcb
699c9bc0a2c34f248e792cb8d2c6ab
Kent Morlan
sylvaticus
agitechcr
8b8f3c8ea96345bf8ddb0a59a008e2