Skip to main content

Subdomain stop auto-creating directory

Comments

6 comments

  • dalem
    don't create a sub domain just park it
    0
  • cPanelMichael
    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.
    0
  • dgware
    [quote="cPanelMichael, post: 1505631">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.
    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.
    0
  • cPanelMichael
    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.
    0
  • dgware
    Support ticket: 4401173
    0
  • cPanelMichael
    To update, the user was recommended to modify the .htaccess and list owa as an application route. EX: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} ^owa/ RewriteRule ^ index.php [L]
    Thank you.
    0

Please sign in to leave a comment.