We (my company) recently switch our name servers from GoDaddy to Amazon. Our sites remain hosted on GoDaddy. Before switching name servers, everything worked fine.
We have a site, https://example.com
that will redirect to https
if it was originally entered as http
. We have a second site that is located at example.com/second
and resolves at https://second.com
. This works the same as the first site that redirects to https
from http
requests.
Now that we have switched nameservers, https
no longer resolves. If I go to http://second.com/non-http-part
that doesn't require the redirect, it works. But going to the index where it does redirect, results in the page not loading at all. All of https://example.com
does not load either.
We have contacted Amazon and they have concluded that it's an issue with the .htaccess
files. This seems strange to me because it sounds more like a DNS issue, but this isn't my area of expertise, so I could be completely wrong.
Below is our .htaccess
file.
rewriteengine on
rewritecond %{HTTPS} off
rewritecond %{HTTP_HOST} ^www.example.com$ [OR]
rewritecond %{HTTP_HOST} ^example.com$
rewriterule ^(.*)$ "https\:\/\/example\.com\/$1" [R=301,L]
#---[SITE PASSWORD PROECTION]
#AuthName "Restricted Area"
#AuthType Basic
#AuthUserFile /home/some_user/public_html/example/includes/security/.htpasswd
#AuthGroupFile /dev/null
#require valid-user
#---[CENTRALIZED REQUESTED]
<IfModule mod_rewrite.c>
RewriteBase /
</IfModule>
#---[OPTIONS AND ERROR DOCUMENT HANDLING]
Options -Indexes
IndexIgnore *
Options +FollowSymLinks
ErrorDocument 400 /index.php
ErrorDocument 401 /index.php
ErrorDocument 402 /index.php
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
#---[DENY ACCESS TO SPECIFIC FILES]
<FilesMatch "^(config\.php|\.htaccess|\.htpasswd|\.log|php\.ini|php5\.ini|readme\.html)">
Deny from all
Allow from 127.0.0.1
</FilesMatch>
rewritecond %{REQUEST_FILENAME} !-f
rewritecond %{REQUEST_FILENAME} !-d
rewriterule . /index.php [L]