We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Blank site on www. but not when on sub-domains

Development and Programming

striio's avatar
striio
6 posts
3 years ago
striio's avatar striio

I am trying to send a finished website live for a client on EE 6.2.7. Call it Site2. In development, it has been on a sub-domain demo.[domain2].com and I simply want to make it available on the main www.[domain2].com, no need to move files on the server or anything. When I move it to www. it returns a blank page in the browser (same for the CP login at /admin.php). If I move it to a different sub-domain like test.[domain2].com it displays fine again. The same issue is replicated if I put the site on a completely different domain as a test.

It is a multisite installation, so there is an existing website Site1 on a different domain1 pointing to the root folder with EE installed; Site2 points to root/site2/ with its own index.php and admin.php files there. I updated www.[domain2].com in the relevant places in those files and in the URL and Path Settings of the dashboard. I know it possible to add to the config.php file in the main EE installation but I am wary of adversely affecting the existing website that sits on the root folder.

After research, I have tried the following without success:

  1. Site2 has an htaccess file that follows the EE Docs instructions for removing index.php from urls. That worked fine when on the demo sub-domain. Tried removing the file to reinstate index.php in urls; then rebuilding htaccess following the different configurations suggested in EE Docs; testing the site load each time.
  2. Tried loading on the www domain an alternative simple index.php file echoing “test” and a simple image file from root/site2 - both display, so the domain is pointing at the right directory. Removed the EE index.php and replaced with a fresh version. When I tested altering the $system_path location, an (expected) error flashed up in the browser saying the path to the system folder was wrong… so the index.php file at least seems to be reached on the domain…?
  3. Cleared cache in EE CP then manually cleared the EE cache folder via ftp
  4. Temporarily disabled extensions via CP -> Utilities
  5. Keep checking the URL and Path Settings in CP match those in index.php/admin.php - I am not sure where else in CP those would need to be checked as those are the only places I update them…? (Again, it all works when on a sub-domain.)
  6. EE Debugging on; EE PHP Info display_errors on; checked web host’s server log file. I am not seeing obvious error messages in those, but also am not experienced in what to look for.

In case relevant, when not trying to point it at the new site on EE6, domain2 points at the client’s current site on EE2, which is a separate directory on the server.

It seems such a crazy small thing that is preventing me sending the site live on the main domain, but am at a loss how to solve! Any suggestions, please?

       
Rob Allen's avatar
Rob Allen
3,105 posts
3 years ago
Rob Allen's avatar Rob Allen

My first thought was the domains DNS, does it have appropriate A records for www and non www?

       
striio's avatar
striio
6 posts
3 years ago
striio's avatar striio

Thanks for the suggestion. Admittedly, I don’t yet massively understand DNS so I asked the web host to check whether the domain’s DNS looks right in the circumstances and they seemed to think it looked alright.

Last year, I did an almost identical migration from a demo sub-domain to the main domain of the existing Site1 on this multisite installation, and it went a lot smoother than this!

       
striio's avatar
striio
6 posts
3 years ago
striio's avatar striio

To close this topic off:

Via EE Support, eventually worked out what was causing the blank site on the main domain. It was a combination of still using an old PHP version (5.x) on that domain as required by the client’s existing site (which was 11 years old and built on EE2) and a small bit of code in the Assets add-on for the new site that was not playing nice with PHP 5, so causing the site not to load properly. When I had been building the site on the demo sub-domain it had been using a modern PHP version, so the conflict didn’t present itself.

EE updated the Assets piece of code for greater compatibility, which fixed the issue and got the site displaying, and then I updated the domain/site to PHP 7.x anyway.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.