DNS Question

Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
I have a client whom I just took on. They need to be able to type mycompany.com or www.mycompany.com in their web browsers on their internal network and resolve to their hosted web site.

They have a nice $20,000 web site without a contract. The site does NOT use relative links. So everything is hardcoded to site.com/mypage.html rather than ./mypage so on so on.

They have the same internal DNS as they do external. Company.com internally and company.com externally for the site.

Normally I toss IIS on the DCs and setup a meta tag to redirect them to the www version of the site. But since the site is hardcoded to not include the www I can’t do that.

Any thoughts on how I would resolve this one?
-Daniel

Comments

  • blargoeblargoe Member Posts: 4,174 ■■■■■■■■■□
    That's a tough one... maybe you could cobble something together with a PAT rule on your router to direct anything to <ip addresses of your domain controllers>:80 to the web server?
    IT guy since 12/00

    Recent: 11/2019 - RHCSA (RHEL 7); 2/2019 - Updated VCP to 6.5 (just a few days before VMware discontinued the re-cert policy...)
    Working on: RHCE/Ansible
    Future: Probably continued Red Hat Immersion, Possibly VCAP Design, or maybe a completely different path. Depends on job demands...
  • DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    I don't know much in this area, but how difficult would it be to rebuild the site to use relative paths rather than absolute?
    Decide what to be and go be it.
  • undomielundomiel Member Posts: 2,818
    Ideal solution would be to migrate them to a new internal domain i.e. company.local. But an easier solution would be to implement a proxy server and rewrite or redirect the url.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
    Thanks for the replies. Just realized I clicked the wrong section for this posting. whoops... oh well.
    undomiel wrote: »
    Ideal solution would be to migrate them to a new internal domain i.e. company.local. But an easier solution would be to implement a proxy server and rewrite or redirect the url.

    I was thinking that very thing. I don't really want to hack through Squid to figure it out and I am sure they don't want to buy a ISA/TMG box also. I actually like the idea since the client does not have any sort of proxying. But they are an office devs...cheap devs... so they would hate me.

    No easy answer here huh? Dang.

    Best I can tell they need to fix their web site. Since we can't rename the domain at this point.
    -Daniel
  • undomielundomiel Member Posts: 2,818
    squid : hosts_file configuration directive

    You could try setting up a quick simulation in a virtual environment to make sure it works properly. It looks like you could just use a custom host file on that machine instead of rewriting the urls.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • Daniel333Daniel333 Member Posts: 2,077 ■■■■■■□□□□
    Looking at about 200+ machines. Mac, Windows, Linux and 2003 R2 server. I think the host's file is out.

    Actually just gave the news to management that we can't do this without dollars/hours. Doesn't sound like people are happy over there.
    -Daniel
  • qwertyiopqwertyiop Member Posts: 725 ■■■□□□□□□□
    We actually do this at my office by pointing our intranet site (home.mycompany.com)
    by creating a pointer on zoneedit
    www.zoneedit.com

    Let me know if you have any questions and ill ask my co-worker in the morning
  • RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
    Devilsbane wrote: »
    I don't know much in this area, but how difficult would it be to rebuild the site to use relative paths rather than absolute?

    This would be easy. PowerShell with a RegEx could get it done.
  • undomielundomiel Member Posts: 2,818
    That's just the host file for the squid proxy to load, not a host file deployed to all the machines. You wouldn't want to do that as it could cause all sorts of AD issues.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • undomielundomiel Member Posts: 2,818
    Decided to puzzle out the PS way of accomplishing what RK suggested and came up with this:

    Get-ChildItem -Path "E:\websiteroot" -Recurse -Include "*.html" | foreach {(Get-Content $_) -Replace "`"http://company.com","`"http://www.company.com&quot; | Set-Content $_}

    Of course you'll want to test it on a copy of the site to make sure you don't replace something that shouldn't be replaced.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
Sign In or Register to comment.