RewriteCond %{HTTP_ACCEPT} text/html [NC]
RewriteCond %{HTTP_HOST} ^mysqite\.com$ [NC]
RewriteRule ^$ path/to/html/my-main.html [L]
RewriteCond %{HTTP_ACCEPT} text/html [NC]
RewriteCond %{HTTP_HOST} ^mysqite\.com [NC]
RewriteRule !^/path/to/html/my-main$ path/to/html/my.html [L]
server {
listen 80;
listen 443 ssl;
server_name example.com;
ssl_certificate path/to/cert;
ssl_certificate_key path/to/key;
return 301 $scheme://www.example.com$request_uri;
}
server {
listen 80;
listen 443 ssl;
server_name www.example.com;
ssl_certificate path/to/cert;
ssl_certificate_key path/to/key;
# rest goes here...
}