PDA

View Full Version : How do I redirect /CPanel URL -> domain:2222


albatroz
10-29-2004, 06:32 PM
To reduce the number of confusions I would like to create a sort of alias in Apache, so when my customers type

http://domain.com/cpanel
they are redirected to
http://domain.com:2222

Can anybody give me an idea for having this thing working?

Thanks in advance

ja3
10-30-2004, 08:52 AM
First create a directory named cpanel in /var/www/html. Then make a index.php file in that directory with the contents:

<?php header("Location: http://yourhost.com:2222/"); ?>

Then edit the /etc/httpd/conf/httpd.conf file and add the alias:

Alias /cpanel /var/www/html/cpanel/

I've not checked this myself but I think it will work.

Greets,
ja3