Forum Moderators: phranque
I would like to use .htaccess to force a redirect of [mydomain...] to something else.
A standard redirect does not work as cpanel is a system redirect and cannot be overriden in the normal way.
I tried to create a directory called cpanel and put an htaccess in that directory with no sucess.
How can a reddirect of cpanel be achieved to overide the system redirect?
Regards Peter
Also, if your host agrees to do this without any argument, consider getting a new host; The reason it's done this way is to prevent malicious attacks on the cPanel script (because it is "shared" by all users of the server).
Jim
if domain is "mydomain.com" then go to #*$!.otherdomain.com when mydomain.com/cpanel is called without comprimising security.
or if exist homedirectory/username/cpanel/.local when mydomain.com/cpanel is called goto the address in that file instead of the server default without compromising security?
Regards
Peter
cpanel takes priority, since it is configured in the httpd.conf server config file. This cannot be overridden with .htaccess files, which execute later. You will have to modify httpd.conf, or ask your host to do so.
It's your provider's box and they have control over the configuration, you can't do a thing about it. If you're doing hosting for people with domains using Cpanel, then you should have the WHM control panel for your reseller account to set up your customers' accounts. And your customers should be able to access their control panel and mail using theirdomain.com:1234 or mail.example.com
Some providers of reseller hosting stay transparent and/or let you have your own branded Cpanel for an extra charge, and many provide your branded Cpanel included in your reseller hosting package at no extra charge - and an IP number, too.
If your provider doesn't allow it, and can't be transparent, then change providers. Cpanel reseller hosting is cheap enough, with plenty of choices out there.