Default to home page

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all

In making web pages other than the home page index.htm is there any way of
putting code in all the other pages so that if someone enters the site other
than by the home page, it automatically opens the home page, so that
navigation can start from there.

Thank you, to all who reply in anticipation.


Re: Default to home page

Centaur wrote:
Quoted text here. Click to load it

Check the referrer, and if it's not your homepage, send them to the
homepage. This can be done with a setting in the server configuration.

But I think it's a very bad idea. What problem are you trying to solve?


Re: Default to home page

HI Mattias

My web site uses frames, however, I notice from the web log, somtimes people
are entering on pages such as the "Answers" page to FAQ, or even some
products page. Now people arn't likelt to buy anything if they don't know
who they are buying form - some people of coarse can look atthe url and
reduce it to its lowest level ie, but i was hoping I can save
people the problem, so long as it does'nt cause me other navigational
problems. I didnt really want to plague each page withe a "If you arrived on
this page then click here to star" or similar

May I ask why iys a bad idea please,

Best wishes and thank you for replying


Quoted text here. Click to load it

Re: Default to home page

declared in alt.html:

Quoted text here. Click to load it / (see under "Your page uses

BTW: Please don't post upside down.

This will help: /

Mark Parnell

Re: Default to home page


Quoted text here. Click to load it
Check document.referrer for the home page.
If not equal then set document.location.href to the home page.

Dennis Marks /
Mail to the return email address is bounced.
Go to web site for active email address.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- - The #1 Newsgroup Service in the World!
-----==  Over 100,000 Newsgroups - 19 Different Servers! =-----

Re: Default to home page

*Dennis M. Marks* wrote:
Quoted text here. Click to load it

Anything involving the optional HTTP referrer like this is going to work
really badly for those folks with certain browsers, 3rd party software
and firewalls that are set to not send/block referrers.

The OPs question is commonly seen in relation to frame-based navigation
and the issue of users arriving at pages without the navigation frame
attached. If this is the reason for the redirect then there are
alternative methods of globally including repetitive blocks. For example
via server-side includes (SSI).
Andrew Urquhart
- FAQ:
- Archive:
- My reply address is invalid, use:

Re: Default to home page

Quoted text here. Click to load it

Why would you want to do that?
In doing so, you're inconveniencing users who've bookmarked a particular
page that interested them or who were referred to the page by a friend.


Re: Default to home page

Quoted text here. Click to load it

Not just them.  You're also virtually guaranteeing that anyone who finds
you through a search engine will land on your home page, which won't
contain what they were searching for.  And that virtually guarantees that
the user will go back to the search engine and try somebody else rather
than trying to search for it on your site.  And if they do stick around,
their trust in you has probably been lowered; after all, sleazy operations
are well-known for trying to make their sites come up on searches for
unrelated things.

Site Timeline