I'm a first time user of ASP hosting and was looking for the Winhost equivalent of CPANEL's URL redirect. Under (UNIX-based) CPANEL for my PHP webhosting account, I could set all internal and external requests to 'firefightersonline.com' to be redirected to 'firefightersonline.com/public' so that all the relative references (i.e. my INCLUDE statements would be relative to the redirect of 'firefightersonline.com/public', eg. 'firefightersonline.com/public/scripts/script.asp' How do I accomplish this? Support has sent me the usual KB on subdomain redirects as well as parent path but this does not appear to be the issue. I created a new file called 'Winhostdefault.asp' put it in the root folder with the following code: <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("www.firefightersonline.com") ) > 0 Then Response.Redirect("/public") ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("firefightersonline.com") ) > 0 Then Response.Redirect("/public") End If %> Then when I type 'www.firefightersonline.com' the site does not redirect to /public, instead it shows the root folders. When I click on 'Winhostdefault.asp', I get: "Active Server Pages error 'ASP 0126' Include file not found /public/default.asp, line 18 The include file '/include/subs.asp' was not found." Anyone encounter the same problem? (I see a few people trying to do subdomains or multiple domains for the one webroot - this is not what I'm trying to do. I just my one domain to work out of the /public directory) Many thanks
For the Winhostdefault.asp file to work, you need to make it the Default Document: http://blog.Winhost.com/configuring-a-default-document/ For what you to accomplish though, you might want to use IIS' URL Rewrite instead: http://blog.benpowell.co.uk/2010/02/Winhostcom-how-to-really-run-multiple.html