Click to See Complete Forum and Search --> : making a redirect page in .ASP


lionscub144
04-22-2008, 04:20 PM
alright first off i dont know anything about .ASP i picked a host and paid for it and i didnt know i would have to redirect all the domains im making 3 simple websites all clientside with xhtml 1.0 and CSS2 and this asp redirect is making me want to go climb the friggin walls. Im using brinkster and their customer support leaves alot to be desired, theres no tutorial to really to be able to figure it out yourself..im basically hung up on having to make a redirect page which ive never had to do before.

basically so far ive made a file default.asp in my webroot folder which is like the core folder all domain names need a directory in here currently i only have 2 domains and only 1 has resolved so far because i just made the account less than 48 hours ago.

this is an example of Code i found on how to make a redirect page.


<%@Language=VBScript%>



<%



SiteNameURL = Request.ServerVariables("SERVER_NAME")







Select Case SiteNameURL



Case "yourdomain1.com", "www.yourdomain1.com"



Response.Redirect "domain1.html"







Case "yourdomain2.com", "www.yourdomain2.com"



Response.Redirect "domain2.html"







Case Else 'redirecting everything other than cases selected above



Response.Redirect "domain1.html"



End Select



%>


so far i only have 1 domain name and the other pending www.colladocreations.com

this is how i tried to make the file apparently theres an error in it somehow because it resolves in the browser as... www.colladocreations.com/www.colladocreations.com


this is how i had my file in my default.asp file.

i think my mistake is putting the domain in twice.


<%@Language=VBScript%>

<%

SiteNameURL = Request.ServerVariables("SERVER_NAME")



Select Case SiteNameURL

Case "yourdomain1.com", "www.colladocreations.com"

Response.Redirect "www.colladocreations.com"



Case "yourdomain2.com", "www.yourdomain2.com"

Response.Redirect "domain2.html"



Case Else 'redirecting everything other than cases selected above

Response.Redirect "domain1.html"

End Select

%>


im only making 3 simple websites using CSS2 and XHTML 1.0 and some javascript once i can get past this hang up of having to make a redirect page in .asp i can progress currently this has eaten up the better half of my day and brinkster support isnt too helpful any help would be seriously appreciated.

yamaharuss
04-23-2008, 09:30 AM
Seems this should be handled via IIS. Keep in mind that your redirects are going to hurt you in the search engines. If that's OK, then continue

Your code should work... although your first redirect is a relative link...

Response.Redirect "www.colladocreations.com"

should be

Response.Redirect "http://www.colladocreations.com"


If you need a better host let me know.