Welcome to WebmasterWorld Guest from 54.162.248.199

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Port Redirect

Redirect from port 80 to port 8000

     
10:39 pm on Nov 30, 2005 (gmt 0)

5+ Year Member



Hello,

I am trying to set up a webmail service, but in order for it to work it need to use port 8000 instead of port 80.

I have been able to make it work with a simple htmp redirect


<html>
<HEAD>
<META HTTP-EQUIV=REFRESH CONTENT="2;URL=http://mail.thisdomain.com:8000">
</HEAD>
<body>
<p>Please Wait While You Are Redirected To The WebMail Service.</P>
</body>
</html>

I'm wondering if there isn't a better way of doing this and also I'd like to hide the port number.

10:49 pm on Nov 30, 2005 (gmt 0)

10+ Year Member



You could use htaccess or your config file.

Or you could redirect to a domain on port 80 and have that domain redirect to the domain on port 8000.

[edited by: Quinn at 10:51 pm (utc) on Nov. 30, 2005]

10:50 pm on Nov 30, 2005 (gmt 0)

10+ Year Member



I think this is the syntax for you htaccess file:

Redirect permanent / [domainname.com:8000...]

<added>Should have asked what type of server you were using...</added>

11:18 pm on Nov 30, 2005 (gmt 0)

5+ Year Member



I'm afraid I don't know how to do anything you've suggested, that's why I'm here seeking help.

I'm using an apche 2.0 server on an xp box

4:15 pm on Dec 1, 2005 (gmt 0)

5+ Year Member



I suppose what I'm really hoping to find out is how I can go about masking the port number with mod_rewrite as I'd prefer not to have that in the URL
7:09 pm on Dec 1, 2005 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You'll need to use the RewriteRule [P] flag to do a proxy throughput to the new port to avoid exposing the port number. However, this means your server will have to handle each request/response twice.

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month