Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Subdomain stop auto-creating directory

Discussion in 'General Discussion' started by dgware, Nov 11, 2013.

  1. dgware

    dgware Registered

    Joined:
    May 28, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    I have a subdomain; xxx.domain.com which redirects to domain.com/xxx but it also keeps creating the xxx directory in public_html.

    How do I stop the creating of this directory. When I delete it, it comes back after a week or so.
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,697
    Likes Received:
    71
    Trophy Points:
    203
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    don't create a sub domain just park it
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    Could you elaborate a little more on the existing configuration in place? You mentioned a redirect to a sub-directory, but then also mentioned deleting that same sub-directory. cPanel should not automatically create directories on it's own without you creating the subdomain in the UI. Do you have any other third-party applications or scripts installed that could be creating the directory?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. dgware

    dgware Registered

    Joined:
    May 28, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    I created a subdomain in the UI: xxx.domain.com and the directory as public_html
    I then created a .htaccess file with the following content:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^xxx.domain.com$
    RewriteRule ^/?$ "http\:\/\/domain\.com\/xxx" [R=301,L]


    domain.com/xxx is not a directory, it's an application route. Cpanel automatically keeps creating the xxx directory which breaks the route.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    cPanel should not be automatically creating directories without user actions. Please open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. dgware

    dgware Registered

    Joined:
    May 28, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    51
    Support ticket: 4401173
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    To update, the user was recommended to modify the .htaccess and list owa as an application route. EX:

    Code:
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} ^owa/
    RewriteRule ^ index.php [L]
    
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice