"recommended-project" installs drupal into the /web subdirectory, but hosting solution directs traffic to webroot

by waltWright   Last Updated June 29, 2020 23:07 PM

Per https://www.drupal.org/node/3082474 the preferred document template, drupal/recommended-project, uses a "relocated document root" for security purposes. HOWEVER, many cPanel driven hosting services mandate that the website user lands in the hosting site's public_html web root directory. I can't make it work for a website vistor.

I have researched many ways to accommodate through the use of .htaccess files and settings.php; however, nothing I've tried actually works. For example, I can land on the page, but if I try to log-in, then it gets lost. Or /web shows up in the address bar. Or people write about security concerns that are worse than not doing the relocated document root in the first place. Or...

This solution is "STANDARD", so there must be a well-researched standard way for a web user to land on the public_html, but be redirected SECURELY to the /web subdirectory.


Related Questions

Redirect non-www to www

Updated October 10, 2019 21:07 PM

Repointing a site a subdomain

Updated August 09, 2019 15:07 PM