Subdomain maps to main domain.
-
Hi. I have a wordpress install on a domain: https://www.example.com on a dedicated server. For testing purpouses I also have a domain, beta.example.com on a different server.
On the beta server I’d like to install multipress wordpress. One install in the root, and one subsite in a subfolder (beta.domain.com & beta.domain.com/subblog1 & beta.domain.com/subblog2).
The installation seems to work fine, edited wp-config (with subdomain_install set to false), .htaccess., created blogs.dir.
It seems to work at first, but that I notice that the media files are being downloaded from example.com instead of beta.example.com. Also, allthough the startpage is beta.example.com all the links direct to example.com. When I try to login it automaticly redirects to example.com/wp-admin (which is on a different server). Also with coockies and cache turned off.
I looked for an answer for ages. At first I thought It might be the .htaccess, but that wouldn’t explain that the links direct to the main server.
This is the extra code in the wp-config:
define('WP_HOME', 'https://beta.domain.com'); define('WP_SITEURL', 'https://beta.domain.com'); /* Multisite enabled */ define( 'MULTISITE', false ); define( 'SUBDOMAIN_INSTALL', false ); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'beta.domain.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 ); define( 'NOBLOGREDIRECT', '' ); $cookie_domain = 'beta.domain.com';
Does anyone have any thoughts?
- The topic ‘Subdomain maps to main domain.’ is closed to new replies.