You are viewing a plain-jane printable version of http://CoverYourASP.com/BaseHref3.asp.See how this was done
| ||
The sURLTest arrayI then loop through an array (defined in include/config.asp as we'll see below), searching for strings that will define which server I am running on. When we find a match we add a sub-folder to the path. Here are the arrays in include/config.asp:
As shipped in the download I first look for ".com" in the server name (obviously you should change both of these arrays to fit your circumstances). If a ".com" is found, then I don't need any sub-folder, so I leave the sURLOffset empty. The final base href is therefore "http://CoverYourASP.com/". If "localhost" is found, then "cya" is added to the server name, and I end up with "http://localhost/cya/". Bingo! |