Solved

Apache Tomcat URL mask/redirect

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now