• I just moved my site from my dev server to my live server. On the dev, everything was working fine, however on the live server my subdomains act erratically.

    I can access http://sub.domain.com and it shows my template files. However, none of the javascript/css/images load. In the source, these assets are referencing sub.domain.com. However, if I try to access these assets without the subdomain portion, they load just fine.

    Why is it that everything except my js, css, and images will load on the subdomain?

    Here is a copy of the WordPress portion of my .htaccess file in case that’s the problem:
    php_value max_execution_time 60
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule . index.php [L]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter jtrost

    (@jtrost)

    I realize my above description may be a bit confusing, so I made a test site on my dev server and live server and took screenshots.

    Here is the dev site: http://i.imgur.com/wzjYB.png
    Here is the live site: http://i.imgur.com/iRVPp.png

    Hopefully this makes my problem more clear.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    The .htaccess isn’t working, which means it’s not being read correctly by the server. Normally you have to go get your host to make sure multiviews are on, and allow override.

    Do pretty permalinks work on your main site?

    Thread Starter jtrost

    (@jtrost)

    Yes, all of the permalinks work and go to the correct pages.

    What host? (GoDaddy & Bluehost consistently have this issue.)

    Thread Starter jtrost

    (@jtrost)

    Ipstenu – Neither multiviews or allow override is enabled on my dev server. Same with the live server. I tried enabling them, but that did not fix it.

    Andrea_r – I have my own servers. Have you seen an error like this before on those hosts? If so, how did they fix it?

    Also, the wp-admin page is a 404. That is the only page in the site that does not work.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Allow override should be set to ALL. What’s it set to?

    Thread Starter jtrost

    (@jtrost)

    I was able to get my site running. Here are a few things things I did. I am not saying that they will help everyone, but perhaps if someone is experiencing the same problem as I am they can use these to help them debug:

    -I had an htaccess rule that forced “www.” into the URL when it’s not present (i.e. if someone types in “mydomain.com” it will send them to “www.mydomain.com”). This is an SEO technique to avoid a duplicate content penalty.

    -Make sure you do not have a redundant vhost name. I had http://www.mydomain.com and *.mydomain.com, but the latter covers the former.

    -Remove DirectoryIndex from your htaccess file that also holds the WP rules. I used DirectoryIndex for some of my subfolders that were not using WordPress. Instead I placed htaccess files in each subfolder.

    After clearing up these 3 things, the site worked fine.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    That first one, forcing www … There is NO seo-loss for duplicate content between yourdomain.com and http://www.yourdomain.com. Google doesn’t do that and would be pretty stupid to try, since everyone knows you’re supposed to have both work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multisite Not Recognizing My Subdomains’ is closed to new replies.