Greetings,
We have a couple different domain names pointing to our website and some of them go directly to certain folders.
This is the script I use in my index.asp file to do this:
This works fine except when someone types in one of the second or third domain names, they get redirect to the roper folder but their address bar changes to show that they are just in a sub folder of the main site. We'd rather have it keep the domain name that points into that folder. So if I type in www.yyy.com in my browser, ir redirects me to www.xxx.com/abcd but it also puts that in the address bar. I'd rather have it leave www.yyy.com in the address bat and redirect me behind the scenes to www.xxx.com/abcd.
Then if I click a link to www.yyy.com/filename.htm it could just redirect it to www.xxx.com/abcd/filename.htm.
Is that possible? If so, could someone point me to somewhere that would tell me how to do it that way instead?m I realize I can't do this in one ASP file since each link would have to point to that file, but is there a setting or something that could be done to make that whole domain just default to starting in a folder and going frmo there?
Thanks.
We have a couple different domain names pointing to our website and some of them go directly to certain folders.
This is the script I use in my index.asp file to do this:
PHP Code:
<%
dim serverName
serverName = request.ServerVariables("SERVER_NAME")
if inStr(1,serverName,"xxx.com",1)>0 then
response.redirect("http://www.xxx.com/home.asp")
elseif inStr(1,serverName,"yyy.com",1)>0 then
response.redirect("http://www.xxx.com/abcd")
elseif inStr(1,serverName,"zzz.com",1)>0 then
response.redirect("http://www.xxx.com/abcd")
else
%>
<!-- message for people who didn't enter either url goes here -->
ERROR
<%
end if
%>
Then if I click a link to www.yyy.com/filename.htm it could just redirect it to www.xxx.com/abcd/filename.htm.
Is that possible? If so, could someone point me to somewhere that would tell me how to do it that way instead?m I realize I can't do this in one ASP file since each link would have to point to that file, but is there a setting or something that could be done to make that whole domain just default to starting in a folder and going frmo there?
Thanks.
Comment