Solved

Apache Tomcat URL mask/redirect

Posted on 2007-12-05
5
5,690 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 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

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 …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

772 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