Simplified URLs
Hi,
We'd like to configure our web server (used as a proxy) to take incoming shortened URL's from end users, and present them content located at more complex url's. For example:
1) end user's enter's http://www.domain.com/rate in their browser.
2) the proxy server will reverse proxy that to:
http://servername/folder1/folder2/folder3/indexhtml
3) the url in the browser remains as http://www.domain.com/rate/<uri stuff>
Note:
- we are using SJSWS 7.0 as a reverse proxy
- the apps are residing on other backend servers
- "rate" is not a real physical directory on the web server or the app server; we'd like to think of it as some kind of alias that we can use to represent a longer URL.
[763 byte] By [
tdomana] at [2007-11-27 6:04:02]

# 1
here is 1 solution
. In the front end (server which will be doing the reverse proxy, I will be adding the following entries) in the obj.conf
<Object name="default">
NameTrans fn="map" from="/rate/" to="http://servername:8080/folder1/folder2/folder3"
Route fn="set-origin-server" server="http://www2.servername:8080"
...
</Object>
<Object ppath="http:*">
Service fn="proxy-retrieve" method="*"
</Object>
2. In the back end server which will be hosting the JSF or static content, I would do the following
if it is a static content, then you could do something like
<Object name="default">
NameTrans fn="pfx2dir" from="/folder1/folder2/folder3/" dir="<directory location containing index.html>"
if it is a web application, you can do something like
a) create a web application with uri -> /folder1/folder2/folder3
b) within the web applications's web.xml, add the page that you want to execute in the welcome-file
If I can come up with a better solution, I will let you know. af-course, there are other smart minds out here who can suggest more appropriate solution as well.
thanks
sriram .