[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Apache Tomcat URL mask/redirect

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month13 days, 13 hours left to enroll

656 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