Can apache redirect to another port without displaying the port?
August 16, 2006 12:58 PM
Subscribe
I'm not too well versed in Apache, and I'm having problems finding out if I can do what I want to do: Is there a way to use mod_rewrite to redirect a certain URL to a different port on the same sever without changing the URL displayed to the user? Example: Say I want http://myserver/tomcat to redirect to http://myserver:8080, but still keep the URL as http://myserver/tomcat. I've figured out how to do it so it changes the URL, and that seems to be touted as a "feature" of mod_rewrite in the documentation, but I can't find a way to turn it off. Is it possible? If not though mod_rewrite, then maybe some other module?
posted by emptybowl to computers & internet (10 comments total)
1 user marked this as a favorite
RewriteEngine on
RewriteRule ^/python(.*) http://myserver:9180$1
That properly redirects to 9180, but changes the URL to myserver:9180, while I'd like it to stay as /python
posted by emptybowl at 1:02 PM on August 16, 2006