Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old February 26th, 2004, 07:25 AM
bennylee bennylee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 bennylee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question How to modify this simple asp script?

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

Reply With Quote
  #2  
Old February 26th, 2004, 08:32 AM
frankcow's Avatar
frankcow frankcow is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: http://www.justin-cook.com
Posts: 133 frankcow User rank is Private First Class (20 - 50 Reputation Level)frankcow User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 h 34 m 16 sec
Reputation Power: 5
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

Reply With Quote
  #3  
Old February 26th, 2004, 04:03 PM
bennylee bennylee is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 3 bennylee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question I have try it, still have problem

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

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > How to modify this simple asp script?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway