wordpress multisite problem (subdomains working, file-links broken)

tz89

New member
Joined
Mar 15, 2017
Messages
2
First of all, I have to state that I have little knowledge of this technical stuff and that I don't have access to the admin panel in DirectAdmin. I've been in touch with my hosting provider, but they have no clue what's going on so I hope to gain some advice here which i can pass on to them.

Here we go:

I just got started with Multisite in my WordPress installation and something went wrong. Subdomains are working and I can access the dashboard of any site I create. I can also open the sites themselves, but they are not showing correcly cause links to all files seem to be broken (images, plugin-files, theme-files).

main site: http://twanzijlstra.nl
subdomain showcasing the problem: http://test.twanzijlstra.nl

I am pretty sure that my .htaccess and wp-config files are configured correctly. I copy-pasted as instructed:

.htaccess

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]


wp-config:

define( 'WP_ALLOW_MULTISITE', true );

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'twanzijlstra.nl');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy blogging. */


On another forum someone suggested the following: "I dont use nginx, but yours is not configured correctly. The failed links are caused by nginx."

It gives me some direction, but not much to work with.

Any idea as to what’s happening? And how to fix it? Any help would be kindly appreciated :)
 
Hello,

How did you add test.twanzijlstra.nl ? Is it added as subdomain? Alias to the main domain? Or as independent site with it own public_html?

I suggest that you use either aliases (you can add a domain as an alias in Directadmin) or symlink between public_html of several domains.
 
I've configured wildcard for subdomains as instructed by the wordpress codex:

Click "User Panel" -> DNS Management -> add the following three entries using the three columns:
* A xxx.xx.xx.xxx
(Replace "xxx.xx.xx.xxx" with your website IP.) Click "Admin Panel" (If you have no "admin panel" ask your host to do this.) -> Custom Httpd -> yourdomain.com -> In the text input area, just paste and "save" precisely the following:
ServerAlias *.|DOMAIN|

The Httpd-part was done by my host since I don't have the proper access rights.

This should do the trick, right?
 
Back
Top