|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
I found this multiple domain name redirect asp script and try to modify the script and use it for my client's site.
The server support asp and I have already asked the ISP to add a DNS to point to the same IP address. I have a html index page as the home page, the result I want with the asp redirect page added is when enter URL will direct to the index.htm, when enter URL redirect to a folder named item.info which I have put a index.htm page inside. After I upload the default.asp page and check the site again, it display an error: Microsoft VBScript compilation error '800a03f6' Expected 'End' /default.asp, line 10 Below is the script I have modified. <% sname = Request.ServerVariables("SERVER_NAME") sname = ucase(sname) if InStr(sname,"abc") <> 0 then response.redirect "abcWebFolder" if InStr(sname,"abctemplates") <> 0 then response.redirect ("item.infoFolder") 'elseif InStr(sname,"OTHERSITE") <> 0 then 'response.redirect "othersiteFolder" end if %> Can anyone tell me how to fix it please? Thank you |
|
#2
|
||||
|
||||
|
you need another elseif
sname = uCase( Request.ServerVariables("SERVER_NAME") ) if InStr(sname,"abc") > 0 then response.redirect "abcWebFolder" elseif InStr(sname,"abctemplates") > 0 then response.redirect ("item.infoFolder") elseif InStr(sname,"OTHERSITE") > 0 then response.redirect "othersiteFolder" else 'default redirect end if |
|
#3
|
|||
|
|||
|
Thanks for your help Frankcow.
I have try your script, this time won't display any error message, just a blank page no matter I key in abc.com or abctemplates.com. Any suggestion? Thank you |
![]() |
| Viewing: ASP Free Forums > Other > Programming Help > How to modify this simple asp script? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
![]() |
|