Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
I can't connect to my website using IIS 6.0!!!
Old 12-16-2008, 05:44 PM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
I have no experience programming with vbScript. Otherwise I probably knew how to do it. So, would you please write the code for me ..
How do I get direct server access? I don't have dedicated server for my website yet... Do I need different name and password, than I use for my site?
__________________

Please login or register to view this content. Registration is FREE

Last edited by kasparovda; 12-16-2008 at 05:45 PM..
kasparovda is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-16-2008, 06:02 PM Re: I can't connect to my website using IIS 6.0!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok No problem.

You won't get server direct access unless you are on a VPS or dedicated server.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-16-2008, 06:07 PM Re: I can't connect to my website using IIS 6.0!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
last questions for now,

How many pages to redirect AND most importantly does your hosting package include ASP capability or will it upgrade to ASP hosting
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-16-2008, 10:56 PM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
I will need to redirect about 100 pages. The hosting has .Net Runtime Version: ASP.Net 2.0/3.0/3.5.

(is it what are you asking about?) GoDaddy support team said that I don't get full server access since I do not have dedicated server package. Any ideas from here?

Thank you.


Quote:
Originally Posted by chrishirst View Post
last questions for now,

How many pages to redirect AND most importantly does your hosting package include ASP capability or will it upgrade to ASP hosting
__________________

Please login or register to view this content. Registration is FREE
kasparovda is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 11:59 AM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
Chrishirst, are you helping me today?
__________________

Please login or register to view this content. Registration is FREE
kasparovda is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 01:10 PM Re: I can't connect to my website using IIS 6.0!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
yep,
contrary to popular belief I have a life, and occasionally have to do some work

just tidying up some code to make it easier to follow.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-17-2008, 01:29 PM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
Alright. I hope coding isn't too hard.
__________________

Please login or register to view this content. Registration is FREE
kasparovda is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 02:17 PM Re: I can't connect to my website using IIS 6.0!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
No just a bit of tidying up.
Ok this is the original thread and the code had a couple of rewrites to fix various bugs undocumented features. Final version was posted here

This is a revised and improved version. IMO of course
this is for 404.asp
Code:
<%
' change the constant value to point to your list of URIs
const c_sURIList = "/urilist.txt"

	dim l_iLoop, m_sRedirectTo, m_sRequest, m_asPages()
	dim m_bFound : m_bFound = false
	redim preserve m_asPages(1, 0)

	if CheckFile(c_sURIList) then 
		LoadArray(c_sURIList)
	end if
	
	for l_iLoop = 0 to ubound(m_asPages,2)
		if m_asPages(0,l_iLoop) <> "" then          
			if instr(request.servervariables("QUERY_STRING"), m_asPages(0,l_iLoop)) <> 0 then
				m_sRequest = replace(request.servervariables("QUERY_STRING"),"404;","")
				m_sRedirectTo = replace(m_sRequest,m_asPages(0,l_iLoop), m_asPages(1,l_iLoop))
				m_bFound = true
			end if
		end if
		if m_bFound then exit for
	next
	
	if m_bFound then
		response.status = "301 Moved Permanently"
		response.addheader "Location", m_sRedirectTo
		response.end()
	else

%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Not Found</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
	This is the 404 page
	<br />
	<br />
	Add in whatever text or navigation you want to show the user for pages that are NOT redirected
	
</body>
</html>
<%
	response.status = "404 Not Found"
	response.end
end if

	private sub ArrayInsert(p_sOldURI, p_sNewURI)
		redim preserve m_asPages(1, ubound(m_asPages,2)+1)
		m_asPages(0,ubound(m_asPages,2)) = p_sOldURI
		m_asPages(1,ubound(m_asPages,2)) = p_sNewURI
	end sub
	
	public function CheckFile(p_sFileName)
	' Check that a file exists first 
	dim l_oFSO
	set l_oFSO = createobject("Scripting.FileSystemObject")
	CheckFile = l_oFSO.FileExists(server.mappath(p_sFileName))
	set l_oFSO = nothing
	end function

	public sub LoadArray(p_sFileName)
	' read in the URI LIst
	dim l_oFSO, l_oFSFile
	dim l_sLine
	set l_oFSO = createobject("Scripting.FileSystemObject")
	set l_oFSFile = l_oFSO.OpenTextFile(server.mappath(p_sFileName))
	do until l_oFSFile.AtEndOfStream
		l_sLine = split(l_oFSFile.ReadLine,",")
		ArrayInsert trim(l_sLine(0)), trim(l_sLine(1))
	loop
	l_oFSFile.close
	set l_oFSFile = nothing
	set l_oFSO = nothing
	end sub

	%>
the URI list is a comma separated list of old URIs and new URIs. Each pair should be on a new line.
Code:
/dir/pagename.htm,/dir/newpagename.asp
/dir/pagename1.htm,/dir/newpagename1.asp
/dir/pagename2.htm,/dir/newpagename2.asp
/dir/pagename3.htm,/dir/newpagename3.asp
/dir/pagename4.htm,/dir/newpagename4.asp
Upload the 404.asp to your website root and set your 404 error document to URL and type in /404.asp as the document location, if the script doesn't find the URI list file the array will be empty and you should get a 404 response and the page text for a non-existent file. Add a non-existent URI to the list and a page to redirect, this time you should get a 301 response and the new page should be served out.

zip file attached with the two files included.

I will do a write up of the code on www.modtalk.co.uk as well.
Attached Files
File Type: zip smart404.zip (1.2 KB, 1 views)
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 12-17-2008 at 03:02 PM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-17-2008, 02:35 PM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
Okay, but my new pages are all HTML (not .asp) as well as old pages. How do I deal with it ? ? ?

(For urilist.txt you've got old.html -> new.asp.)You mean I have to rewrite all my pages in ASP?
__________________

Please login or register to view this content. Registration is FREE
kasparovda is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 02:39 PM Re: I can't connect to my website using IIS 6.0!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
it's just a file name.

it could be newpagename.doodah if your server sent .doodah files out as text/html
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-17-2008, 02:54 PM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
Does it mean that I can do old.html --> new.html ?? Or I have to rename files to .asp?


Quote:
Originally Posted by chrishirst View Post
it's just a file name.

it could be newpagename.doodah if your server sent .doodah files out as text/html
__________________

Please login or register to view this content. Registration is FREE
kasparovda is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 03:10 PM Re: I can't connect to my website using IIS 6.0!!!
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you can do whatever to whatever, just as long there was a file called oldfile.whatever and newfile.whatever MUST exist

if you want to rename them all .asp you can.
if you want to name them all .html you can.
if you want to name them all .fred you can.
if you want to do away with file extensions completely and have all your content in folders with a default document you can also do that.

www.modtalk.co.uk does NOT have a single article on it that exists as a physical page, it is completely driven by a more somewhat more complex version of this very code you see here, with all the content stored in a database.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 12-17-2008 at 03:11 PM..
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-17-2008, 05:08 PM Re: I can't connect to my website using IIS 6.0!!!
Skilled Talker

Posts: 79
Name: Yury
Trades: 0
Thank you very much. Now I will not disturb you for a while.
__________________

Please login or register to view this content. Registration is FREE
kasparovda is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to I can't connect to my website using IIS 6.0!!!

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.82403 seconds with 12 queries