| Welcome to WebmasterWorld Guest from 18.104.22.168 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
Redirect from port 80 to port 8000
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
<META HTTP-EQUIV=REFRESH CONTENT="2;URL=http://mail.thisdomain.com:8000">
<p>Please Wait While You Are Redirected To The WebMail Service.</P>
I'm wondering if there isn't a better way of doing this and also I'd like to hide the port number.
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]
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>
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
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
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.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved