ASP script

G

Greg

I need to use an ASP script to redirect to my domains.
This example is what my webhost gave me. But i'm not sure
what i need to change it to.

<%
EnableSessionState=False
host = Request.ServerVariables("HTTP_HOST")
if host = "wb-webdesign.co.uk" or host = "www.wb-
webdesign.co.uk" then
response.redirect("http://wb-
webdesign.co.uk/subdir1/default.htm")
elseif host = "westbarton.co.uk " or host
= "www.westbarton.co.uk " then
response.redirect
("http://westbarton.co.uk/subdir2/default.htm")
else
' if we get no host or undefined host
response.redirect("http://wb-
webdesign.co.uk/nosite.htm")
end if
%>

Any help would be much appreciated.

Thanks,

....Greg
 
J

j

Greg said:
I need to use an ASP script to redirect to my domains.
This example is what my webhost gave me. But i'm not sure
what i need to change it to.

<%
EnableSessionState=False

These two are the domains that will get redirected, so you would put your
domains in place of his, or for a single domain and delete the
or host = "www.wb-webdesign.co.uk" part so it looks like

if host = "your domain" then
host = Request.ServerVariables("HTTP_HOST")
if host = "wb-webdesign.co.uk" or host = "www.wb-
webdesign.co.uk" then

replace with the host you want to redirect to.
response.redirect("http://wb-
webdesign.co.uk/subdir1/default.htm")

This is redirection for a different set of domains, if you dont need it,
delete from elsif to up to else (leave everything from else on)
elseif host = "westbarton.co.uk " or host
= "www.westbarton.co.uk " then
response.redirect
("http://westbarton.co.uk/subdir2/default.htm")

This is the catchall, replace the domain with the one you are redirecting
to. If you need more help, tell me exactly what you want to do and I'll
modify it for you.

Jay
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top