?
Solved

Apache Tomcat URL mask/redirect

Posted on 2007-12-05
5
Medium Priority
?
5,907 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
  • 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 750 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

809 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