Solved

Apache Tomcat URL mask/redirect

Posted on 2007-12-05
5
5,741 Views
Last Modified: 2013-12-02
My company has purchased a system that uses Apache Tomcat, but I do not have any experience with Tomcat.  What I am trying to do is mask/redirect a URL from http://localhost:8080/somefile to http://www.myurl.com.  Is this possible to do with Tomcat and how can it be done?  
0
Comment
Question by:jjexpert1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:hilay
ID: 20416872
Any request from localhost (and any port , but this is less importent) is answered by your own computer (this is why is called local-host). Apache has noting to do with it. Remote server is not requested to answer that call because it does not get it.
You can, however, make a change of each computer that need to access it by altering .host file to make this redirect. Keep in mind this is very unlikelly

GL
0
 

Author Comment

by:jjexpert1
ID: 20419130
I think I asked the question wrong.  What I am trying to do is mask/redirect a URL from http://172.0.0.1:8080/somefile to http://www.myurl.com.  So I am trying to redirect from a remote server and not from my local computer.  Sorry for the confusion.  
0
 
LVL 3

Accepted Solution

by:
hilay earned 250 total points
ID: 20421285
It can done by the apache configuration if the webserver is answering 172.0.0.1:8080. Is somefile is a specific URL or a code name for unknown URLs list ?

I in most case prefer the HTML redirect and not the pure HTTP 3XX (e.g 304) level and do it by meta tag or JavaScript (or both) as it give me more control over the process and I cant put statistical code on the pages.

0
 
LVL 3

Expert Comment

by:hilay
ID: 20421337
I forgot to add this part,
In order to redirect you will need to change apaches config (i.e httpd.conf file) and add a block like this:
<virtualhost 172.0.01:8080>
      Redirect /somefile http://www.myurl.com
</virtualhost>

0
 

Author Comment

by:jjexpert1
ID: 20427475
Thank you very much.
0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question