Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello.
My webhosts don't recognise index.php and don't recognise php code in html files so I have to redirect from index.html to index.php with JavaScript. I wrote a little JavaScript function to test document.referrer.
[syntax="javascript"]function changedirection() {
var domain = 'lunarfish.co.uk';
if (document.referrer.indexOf(domain) == -1) {
window.location = "./lfread.php";
} else {
window.history.back();
}
}Can anyone tell me how I can get around this either PHP or JavaScript wise? Is there a PHP way to get rid of the whole index.html problem in the first place?
Thanks. Dan
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]