Hello folks,
I am not the client of The Planet here, so if it is not allowed to answer my question, no problem.
I am a newbie in the area of domain management. I have some existing subdomains redirecting to some internet sites (not just to mine), work fine.
The problem is the rest of the non-existing subdomains, calling them I just get a kind of green Apache and Cpanel introduction page from my host company (which is not The Planet). I want to avoid this intro page, so in case of any non-existing subdomain I would like to have a redirection to (let's say) mydomain.com.
I have Cpanel, no virtual private server used. The existing subdomains have their own directories and .htaccess files (public_html directory is the parent), their rewrite code are similar to this:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysubdomain.example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysubdomain.example.com$
RewriteRule ^(.*)$ http://www.targetdomain.com [R=301,L]
All the existing rewrites like the above are fine and working well.
My intension is to try to keep the mechanism above (as well as the different redirections of the existing subdomains) and redirect the non-existing subdomains to one domain only.
According to what I found in a topic http://forum.modrewrite.com/viewtopi...5a242e 4f8641 , I tried similar to this code:
RewriteEngine on
RewriteRule ^(.*) http://www.test.com/$1 [P,L]
I placed my attempt into the .htaccess file of the root as well as the .htaccess file of the public_html, not working.
I only get the intro page of my host company when calling non-existing subdomains. I tried to create several custom error handling pages, no way (but this area can also have a solution, I don't know).
Thank you for any possible help,
jimmybutcher
