2

Hope someone could help, am new to bluehost and had a shared hosting subscription. Now my issue is how to modify the subdomain document root.

example: from public_html/sub to public_html/sub/public

also when i created a subdomain it doesn't even allow me to add "/" unlike in godaddy

thanks.

Edson
  • 109
  • 1
  • 7
  • This is not about programming. -1 – Alejandro Mar 23 '22 at 17:36
  • well its true, the thing is I couldn't find any other options other than the answer i posted – Edson Mar 23 '22 at 18:00
  • The answer may be correct and useful, but that doesn't change the fact that the question is off-topic here to begin with, as this is a programming forum and the question has nothing to do with programming. – Alejandro Mar 23 '22 at 18:17

3 Answers3

5

I had the same issue, some how I landed to this URL https://my.bluehost.com/cgi/dm/subdomain and it allowed to to add "/" with subdomain, hope it helps

enter image description here

Wasif Khalil
  • 2,217
  • 9
  • 33
  • 58
0

I found a solution so on the root folder add or edit if already existing .htaccess

RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub.domain.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.sub.domain.com$
RewriteCond %{REQUEST_URI} !sub/public/
RewriteRule (.*) /sub/public/$1 [L]

Done

Edson
  • 109
  • 1
  • 7
0

In order to do this via the Bluehost interface, I followed these steps:

  1. Go to 'My Domains' under 'Domains' in the left-hand column
  2. Click the 'Manage' drop down and choose 'Unassign'
  3. Click the green box that says 'Unassign'
  4. Go to 'Assign' under 'Domains' in the left-hand column
  5. Go to 'Subdomains' under 'Domains' in the left-hand column (If you don't click 'Assign first, then clicking 'Subdomains' takes you to a different page...)
  6. Under the 'Existing Subdomains' header, find the subdomain with the Document Root you want to change and click the red trash can under 'Actions'
  7. Now you can re-assign your domain as an addon or whatever and give it a new Document Root. (I should note, that none of these steps deleted my document root directory).
  8. Go to 'Assign' under 'Domains' in the left-hand column
  9. Follow the steps to assign an existing domain
markgriggs
  • 11
  • 4
  • I should mention that because I had to create a new account on Stack Overflow, I am a newbie again and can't post screenshots in my post, otherwise I would have done so. :) – markgriggs Nov 22 '22 at 13:06