Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Production Server

Posted on 2008-09-29
4
Medium Priority
?
139 Views
Last Modified: 2013-12-25
I am using Dreamweaver 8 as a page management tool but mainly write all the pages myself in Asp. All the urls on the site are absolute urls but the issue with that is when you run it internally before ftping to the server, as you can imagine you can't really surf around the site because the urls are point to the live address instead of the www.myinternalsite.com address. I have thought of all kinds of work arounds like making all the urls dynamic in the beginning and having the header.inc file determine which server the site is hosted on and create a variable that uses the right absolute url, but curious if there are better ways to setup a testing server even though you want to use absolute urls.

0
Comment
Question by:tarrigo
[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
4 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22601865
Why not switch everything over to document-relative links?  Then, the URL doesn't matter:

<a href="http://www.somesite.com/admin/index.asp">

becomes

<a href="admin/index.asp">
0
 
LVL 14

Expert Comment

by:yessirnosir
ID: 22601915
one cure, although it might possibly be worse than the disease, would be to put an entry in your HOSTS file to redirect  the external site to localhost.  You could write a little batch file to swap out the regular hosts file for the modified one semi-automatically.   I've read that Hosts changes are supposed to be immediate, so no need to reboot, but I haven't tested it myself.
0
 

Author Comment

by:tarrigo
ID: 22602065
I have already gone the relative url route, but sometimes that can have its problems when you have includes and other such things. Although, that is the simplest solution.

I have implemented just using a <%=siteurl>/index.asp type solution then it just looks at the ip of the server and makes the siteurl variable whatever I assign. That seems to be the best way, but the only reason I don't like it completely is that some urls reside in text field of a database and those won't get processed when the page is output.  
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 2000 total points
ID: 22603446
Includes are a pain when they contain links.  Another solution is to just reference the URLs with a leading forward slash character, which implies the root.  i.e.

<a href="http://www.somesite.com/admin/index.asp">

becomes

<a href="/admin/index.asp">
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

618 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