Subdomain redirecting to main domain
-
I hope someone can help me. I’ve been using similar forum posts to get to this point but am stuck ??
So I’ve installed WP multisite in the root folder of the main site as instructed and after lots of troubleshooting using other forum links (thanks guys), I finally got the network admin working.
The main site works perfectly well and the admin area works well, however the first subdomain site I created, although it shows up at the subdomain address (ie kiorapsychotherapy.lifeaftertrauma.com.au) any links to pages/posts etc redirect to the main domain rather than the subdomain address. I’ve installed domain mapping but don’t seem to be able to get it to work either at this point and I think everything is in the correct place as per instruction :/
In the end I want the site to redirect to its actual web address (ie kiorapsychotherapy.com.au) … currently if I go to this url I get the following: https://lifeaftertrauma.com.au/wp-signup.php?new=www.kiorapsychotherapy.com.au
so it’s finding a ‘non-existant’ site. I understand that if I change subdomain install to false then it goes directly to the main domain and also if I amend the wp-config file to include a NOBLOGREDIRECT then I get the same result. Should I be looking at the DNS entries? I have a wildcard DNS set up … i also have subdomain DNS entries … is this correct?I don’t want to make any more updates to the theme until I have this sorted so please excuse the WIP.
Here is my current relevant code from the wp-config
define('WP_DEBUG', false); define('WP_ALLOW_MULTISITE', true); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'lifeaftertrauma.com.au'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
And from the htaccess
<IfModule mod_rewrite.c> RewriteEngine On 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] </IfModule>
I’m sure someone can see quite quickly what I’ve done wrong … I’m hoping ?? And I hope that I explained that clearly. This is my first multisite and am rather confused :/
Thanks so much.
- The topic ‘Subdomain redirecting to main domain’ is closed to new replies.