A friend of mine asked me for advice/help on publishing articles on the Internet. He wanted to do it in a controlled manner. So I quickly knocked together a cheap and cheerful method to demonstrate a concept.

At some later stage, I will put together a much more sophisticated method involving Indexes, DataBases etc (I might even publish details of the method - if anyone is interested !!). But this will do just for the moment.

T he first point was that the articles are in Microsoft Word format.

Well we need it in Web Page format - well that bit was easy, Word allows you to save documents as HTML.

Anyone that is clever enough to write an article in Word, must be clever enough to save it as HTML.

Now we can start from the point of having a Web Page to publish. It really does not matter how the page was created !! (Any method of creation is OK !!)

The page given to me as a sample is:-
shown here

You can see the source of it either by:-
Clicking on 'View' then on 'Source'
OR
clicking here

The next step is to get it up to the internet - there are two ways that this could be done:-


When we get it to the Internet, there are several steps that I would take, most of them are described and discussed below.

1.

The file needs saving on the server.

I would most emphatically NOT save it with the Authors file name !!
There are serveral reasons for this, I will leave it to you to work out what they are.

I would generate a unique file name !!
The name that I have chosen for our sample file is RC11.HTM

Two random Upper Case Letters followed by a random number between 01 and 99, gives around 50,000 names - that should keep you happy for a little while.

2.

You would not want a bland publication like that though.

You would want to encapsulate it in a Web Page with your 'House Style'
Maybe copyright info etc

You can see a sample at
www.byershostinggeorge.co.uk/test/encapsulating.asp?enc=rc11.asp

The code for that page is shown below.


<!DOCTYPE HTML PUBLIC 
"-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>An Encapsulation</title>
</head>
<body>
<center>
<b>
<font size="+3" color="blue">
Your house style
</font>
<P>
At the top
</b>
<P>
<iframe height="200px" width="600px" 
src="<% =Request.QueryString("enc") %>">
</iframe>
<P>
and at the bottom
</center>
</body>
</html>

3.

I can hear you asking the question 'What is there to stop clever folk just using the HTM file directly.

Well the answer is because it will not be there !!

As soon as you have got the HTM file secured on the Server, then you make some changes and then save it as an ASP file
THEN
you delete the HTM file.

The major change that you make is to replace


<HEAD>

with


<HEAD>
<%
cScript1 = Request.ServerVariables( "SCRIPT_NAME" )
MyPos = InstrRev(cScript1, "/", -1, 1)
if MyPos > 0 then
	cScript1 = Mid(cScript1, (MyPos + 1), 250)
end if
cNewAddress = "encapsulating.asp?enc=" & cScript1
%>
<script LANGUAGE="JavaScript">
<!--
if (parent == self) document.location.href = '<% =cNewAddress %>';
// -->
</script>

There are also several other changes that I would make - for example, I would

  • change the references to Web Pages into Links;
  • add some LINKBACK code;
  • add a hit counter;
  • etc, etc

So, you cant go to the .HTM page, because it wont be there.
You could try going directly to the ASP file
BUT
you will be redirected - try it with RC11.ASP !!!


If you want the ASP code to do all of the above work within the UpLoading Phase - ask me.

If you want an all singing, all dancing package that give indexes, controls access, records hits etc, etc, etc - ask me.