Comments on: SSL Redirect on Network Solutions Shared Web Hosting https://emarketinguide.com/ssl-redirect-issues-network-solutions-shared-hosting/ Sat, 15 May 2021 02:10:59 +0000 hourly 1 By: Erik Milham https://emarketinguide.com/ssl-redirect-issues-network-solutions-shared-hosting/#comment-282149 Sat, 15 May 2021 02:10:59 +0000 http://emarketinguide.com/?p=1138#comment-282149 0

This is the ONLY Clean way to Redirect with Networksolutions. Took me hours of testing. Works best for SEO. Network Solutions is a challenging Hosting platform.

This will work .htaccess all you replace is changeexample.com with your domain. Easy.

## Base Redirects ##

# Turn on Rewrite Engine
RewriteEngine On

# Remove trailing slash from non-filepath urls
RewriteCond %{REQUEST_URI} /(.+)/$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ https://changeexample.com/%1 [R=301,L]

# Include trailing slash on directory
RewriteCond %{REQUEST_URI} !(.+)/$
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+)$ https://changeexample.com/$1/ [R=301,L]

# Force HTTPS and remove WWW
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [OR,NC]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://changeexample.com/$1 [R=301,L]

Best of Luck! This is current as of 05/14/2021

]]>