WordPress Multisite non-ssl subdomain redirect issue
-
Hello
I am having the following issue when I enter the non-ssl version that is http://test.domain.com it will redirect me to https://www.domain.com when it should redirect me to https://test.domain.com
The base domain is https://www.domain.com
Few things to note:
- I have setup a multisite wordpress installation using the subdomain method as the subdirectory option was not available for me since I am using an already existing wordpress installation.
- I have replaced all urls http:// with https:// in the entire database
- I am not using any https redirect plugin currently, I disabled the “Easy HTTPS (SSL) Redirection” plugin make sure it wasn’t this plugin causing the issue.
- In my network admin I have both sites with the ‘Site URL’ field displaying the https://{the domain}
- I reset my browsers cache between every test to make sure its not my browser not caching the redirect
Here is my .htaccess file
RewriteEngine On # for subdomains RewriteCond %{HTTPS} !=on RewriteCond %{HTTP_HOST} ^(test\.domain\.com)$ [NC] RewriteRule ^.*$ https://%1%{REQUEST_URI} [R,L] # for main domains RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R,L] RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L]Please help as I have no idea why it constantly redirects me to the base url/website.
The topic ‘WordPress Multisite non-ssl subdomain redirect issue’ is closed to new replies.