Solved

URL rewrite with DNS in Windows 2008

Posted on 2015-02-19
14
66 Views
Last Modified: 2015-02-25
Hi,

I have a web application in which i want to rewrite the URL rewrite as:
http://mysite.com.tr (a real domain name)
To an alias (http://foo/baz)

How can i do this via DNS in W2008? (Essentially i have 600 users and modifying hosts file is not manageable)

Br.
0
Comment
Question by:jazzIIIlove
14 Comments
 
LVL 19

Expert Comment

by:helpfinder
Comment Utility
check IP address of real domain (e.g. do a ping of that page) and associate that IP address with your desired alias.

btw to change hosts could be done with simple batch file which distribute (copy) hosts file to your clients (I know you do not want to solve this like this, I am just saying)
0
 
LVL 35

Expert Comment

by:Kimputer
Comment Utility
DNS will not help if you REALLY want the url change (not just host, but also url, you said in your example /baz)
Even then, if you don't have full admin access to the website, it might not even work, as the website has it's host headers configured on the original hostname.
0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
Hi helpfinder;

Thanks, but editting hosts file in client machine is out of question

Hi Kimputer;

What if my alias is not http://foo/baz but http://foo/ Can I still do this via DNS?

Br.
0
 
LVL 35

Expert Comment

by:Kimputer
Comment Utility
If you are in full control of the http://foo server, then it can be used (because the server has to accept the header)
0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
How can it be used?
0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
I need to know how i can set DNS on W2008. Please help..
0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
For URL rewrite action
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 2

Expert Comment

by:UnHeardOf
Comment Utility
Not possible with DNS. You can do a cname record to point to the domain you want but that won't change the url to reflect the change of domains.

Some firewalls can do a redirect or the web server can do what your looking for.
0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
The web server in place is tomcat 7. How to do this with tomcat 7?
0
 
LVL 35

Assisted Solution

by:Kimputer
Kimputer earned 500 total points
Comment Utility
edit your server.xml file on the tomcat 7 server to look like this (not exactly, just pointing you to how it should look, make sure the syntax is correct, the dots .... are just an example):

<Host name="mysite.com.tr" ...>
  ...
  <Alias>foo</Alias>
  ...
</Host>

Open in new window

0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
Hi Kim,

hostname in server.xml is as localhost and when i try out the alias. It is actually not working..

Thanks for the interest btw.

Br
0
 
LVL 35

Expert Comment

by:Kimputer
Comment Utility
Then you probably have one site there, and it should already work (because everything coming in will show the same website, wether it's mysite.com.tr or foo.
0
 
LVL 12

Author Comment

by:jazzIIIlove
Comment Utility
The root of this question, i need to bookmark the aliased site. But when i want to reach via the bookmark, it fails.. (I couldn't make this work even in 'the above' state
0
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
Comment Utility
on the test PC:

ping foo
(has to be the same result as ping mysite.com.tr)

If this is true, tomcat 7 problem.
If this is not true, DNS has not been set correctly

So more results/logs/screenshots if possible.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

771 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

11 Experts available now in Live!

Get 1:1 Help Now