PDA

View Full Version : canonical issue in the FLESH


lineops001
01-20-2007, 06:13 AM
11.10 PM CANADAIAN MOUNTAIN TIME 19TH JAN 07.

decided to finally upload some stuff (apart from the home page) to the domain i purchased for 3 years www.restaurants-in.org and found what you will see..

had to remove the www. to get my site home page.. http://restaurants-in.org

needs work i know - never meant to publicise it like this - but WHAT sample of canonical issues!

L

mods - sorry about the links - but there you have it!

Glen
01-21-2007, 09:49 PM
hmm very strange..you live in SA aswell? :eek:

Paz
01-22-2007, 06:44 AM
Hi L.,

You've used VBscript code in a plain HTML file. The code won't get p****d unless you do something on the server.

If you want the code to "work" you need to rename the file to index.asp (or even restaurants.asp) and set up your server to use that as the default file. You can do that from your control panel (File Manager in most Windows plans).

Better still switch to Linux hosting. It's cheaper and you can use .htaccess to redirect was well as all the other goodies you get with .htaccess.

Also I'd change the internal navigational structure to point to "/" for Home, rather than the index.html you have now.

Cheers,
Paz.

Blazingpie
01-22-2007, 02:32 PM
ok, if you intend to use classic ASP (as your '<% %>' tags suggest) on a linux server like that site is on now, you'll need to ask Siteground if they could install chili!ASP (or whatever it's called) which will allow you to run classic ASP on Linux.

Or you could use php instead, as your server supports that. Rename that page's extension to .php, and replace the vbcode with

<?php
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: http://www.restaurants-in.com');
?>


:)

lineops001
01-22-2007, 05:16 PM
oh thank you thank you :-)

my c***p coding abilities... same old story... yadah yadah... *sigh*

thank you super people for the insight and suggestions. very much appreciated. and Paz, for the linux hosting suggestion and the '/', and BP for the vbcode.

And Glen, no I am in Canada at the moment, will be in SA for a holiday soon and then back here.

... happy monday :p

Blazingpie
01-23-2007, 05:48 AM
glad to ahve been of help :)

btw, if you want to use the php code i supplied, you may want to add

die();

so the code will look like this:

<?php
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: http://www.restaurants-in.com');
die();
?>

what die() does is end the script; sometimes when you do a redirect the code beneath the script continue to run, which can cause problems :(

lineops001
01-23-2007, 06:17 PM
:grin: thank you!