
Originally Posted by
lat9
Since the site is running https-all-the-time, your site's root .htaccess file should 'support' that. Make a backup copy and add the following clauses close to the top of the file to 'force' the access to https://vinyldecalsuperstore.com/{whatever} when the access is made as
vinyldecalsuperstore.com/VDSstore/{whatever}
http://vinyldecalsuperstore.com/{whatever}
http://www.vinyldecalsuperstore.com/{whatever}
https://www.vinyldecalsuperstore.com/{whatever}
Code:
RewriteCond %{SERVER_PORT} 80 [OR]
RewriteCond %{HTTP_HOST} ^www\.vinyldecalsuperstore\.com$ [NC]
RewriteRule (.*) https://vinyldecalsuperstore.com/$1 [R=301,L]
I've got a bunch of this stuff in my .htaccess folder right now, including a domain that points to my primary vinyldecalsuperstore.com
Code:
RewriteCond %{HTTP_HOST} ^vdsdecal\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.vdsdecal\.com$
RewriteRule ^/?$ "https\:\/\/vinyldecalsuperstore\.com\/" [R=301,L]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^vinyldecalsuperstore\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.vinyldecalsuperstore\.com$
RewriteRule ^/?$ "https\:\/\/vinyldecalsuperstore\.com\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^/?$ "https\:\/\/vinyldecalsuperstore\.com\/VDSstore\/" [R=301,L]
RewriteBase /
# Rewrites all URLS without VDSstore in them
RewriteCond %{REQUEST_URI} !^/VDSstore/
# Rewrites all URLS [Replace "example" with the actual domain, without the TLD (.com, .net, .biz, etc)]
RewriteCond %{HTTP_HOST} ^(www\.)?vinyldecalsuperstore\.
# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /VDSstore/$1 [L]
Is there a particular order I should have all this and if so, where should I insert the code you gave me?
Thank you so very much!
Bookmarks