Subdomain stop auto-creating directory
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.
-
don't create a sub domain just park it 0 -
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 -
[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 -
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 -
Support ticket: 4401173 0 -
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.
Comments
6 comments