javascript redirect usability

T

Thomas McCarthy

Hi! I am keeping my portfolio at Http://www.lambelly.com. This is a site
utilizing PHP templates. My question is this: I could think of no good way
of linking the index.html page to the php templates other than using a
javascript redirect. In theory, this could cause problems in some
browsers, however. I was wondering if anyone had any better ideas about
how to do this in a more failsafe way, or if
anybody had any comments on the site in general.

Thanks!
Tom McCarthy
 
W

William Tasso

Thomas said:
Hi! I am keeping my portfolio at Http://www.lambelly.com. This is a
site utilizing PHP templates. My question is this: I could think of
no good way of linking the index.html page to the php templates other
than using a javascript redirect. In theory, this could cause
problems in some browsers,

nearly right: in practice some visitors will get a blank screen
however. I was wondering if anyone had any
better ideas about how to do this in a more failsafe way,

actually using the home/index page would work well
configure the server to deliver your real home-page
permanent redirect is next favourite
meta refresh may provide some fall-back
placing a link on the page is mandatory in case all others fail.
or if
anybody had any comments on the site in general.

nice background
 
T

Toby A Inkster

Hi! I am keeping my portfolio at Http://www.lambelly.com. This is a site
utilizing PHP templates. My question is this: I could think of no good way
of linking the index.html page to the php templates other than using a
javascript redirect.

Firstly, not answering your question, but take a look at:

http://www.lambelly.com/template.php

It is a good idea to have a fall-back page if ?include=something is
missing! Probably you should set '?include=home' if none is given.

Now, on to your question. Create a plain text file called '.htaccess'
(note: the leading dot is important!)

It should have one line of text:

DirectoryIndex template.php?include=home

This specifies a 'default page'.
 
A

AndyEd

Thomas McCarthy said:
My question is this: I could think of no good way
of linking the index.html page to the php templates other than using a
javascript redirect. In theory, this could cause problems in some

If you do stick with a javascript redirect, look into
document.location.replace(url) instead of setting document.location
directly.

This prevents the first page from being entered into history.

hth,
Andy Edmonds
Uzilla LLC. "Tools for a Usable Web"
http://www.uzilla.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top