Web Hosting Talk







View Full Version : Redirect -


dai_hiep
08-27-2004, 02:44 PM
Hi, I am setting up Apache 2 sever on Linux system. Sorry beause of a newbie question. Instead of Redirect URL, do we have any syntax in httpd.conf file to redirect port (80) to other port (443)?

Thanks for you help.

Hiep

eth00
08-27-2004, 04:02 PM
Don't think so, best bet is to just have a webpage redirect via some java script or something.

UserUnfriendly.com
08-27-2004, 04:42 PM
I'm not sure exactly how this is done. However, if you look at the httpd.conf for a cpanel server, they set all aliases that end in /cpanel to redirect to a simple script. Inside that script is basically just a redirect to the port. I'm sure you could set up something like that.

matraex
08-28-2004, 03:15 AM
Hiep,

I have never done this before but I have done other things like it.

Take a look at the mod_rewrite module in Apache. Specifically take a at the %{SERVER_PORT} variable.

I am sure you already know but also realize that normal usage of port 80 is for http protocol and 443 is for https.

http://httpd.apache.org/docs/misc/rewriteguide.html

Good luck and post back to let me know if this worked for you