22 Sep 09 12:35 am
Hi Udi, sorry for the slow reply, haven't checked the forum in a few days, and missed the email alerting me you responded.
Ok so, to create hidden pages that are still indexed by search engines you do realise that these pages will not be hidden exactly as they will have to be available by ther url, e.g.http://www.mywebsite.com
- gets me the normal homepagehttp://www.mywebsite.com/special_home_page.html
- gets me the special home page
So the special page is never actually hidden, and anyone could just come along and access it.
We can of course limit who see's what pages based on where they've come from, but your pages are going to have to be available to the search engines to index them - and when they are listed in the results - they will be listed with the full urls.
Have you thought about if/how you plan to restrict access to your special hidden pages when people shouldnt be accessing them?
To make the pages completely hidden, that is you'll get different pages through the same url based on where you've come from, really we need to be doing it using PHP or similar - you'll need to know if your web hosting supports PHP.
We can reasonably simple do what your asking without using PHP, but there are better ( and more technical ways ) of doing it, and this is purely just an example of how you can do it really simply.
index.html - your main home page
index_special.html - a special home page
I'll just paste the code of these page in here and expliain them as i go1.
Firstly we have some code we'll need on all our pages, this is the script which enables us to track our usesr entry point - create a file and name it cookie_redirects.js
, in the same directory as your index.html. In this file put the following content.2.
Next is the home page ( the important bit are the two scripts at the top )
When we tell it to checkEntryPageRedirect(); it checks to see if we've tracked them coming from somewhere else, if they have we redirect them.3.
Next is the special home page ( again the important bit are the two scripts at the top )
When we tell it to trackEntryPage(); it stores a cookie that has this pages url in it, that way we know this is the home page they should return to.4.
Next is privacy page ( or any other page ) ( again we need our cookie_redirects.js script )
Here we don't do anything automatically when we load this page like the other 2, but we have options on how we handle links back to the home page.
The first link example sends the user to the actual home page, where we detect if they should be redirect to the special page.
For the second link, when they click it, it checks to see if they should be going to a special home page, and send them there instead of home.
And thats about it.
Any questions or problems just ask!