From: adam <ada...@gm...> - 2008-08-17 19:45:59
|
SEO guidelines suggest having a single canonical hostname for your site, so arguably any request to a HTTP_HOST that doesn't match your SERVER_NAME should just redirect to the SERVER_NAME anyway. Otherwise you end up having multiple entries for your site at google etc, under yoursite.co.uk, www.yoursite.co.uk and www.yoursite.com when you really want your site to be known and indexed as yoursite.com. Is there any reason the hostname is in any urls anyway (pardon ignorance here if someone is using imgs.yoursite.com to allow additional connections etc...) rather than using relative or absolute paths without the host? -- Adam On Sun, Aug 17, 2008 at 1:50 PM, Stephane Casset <se...@lo...> wrote: > Le Sat, Aug 16, 2008 at 04:13:24PM -0400, Michael Risch écrivait : >> Hi all - > > Hi, > >> Redirects are screwed up all over my site. My primary host is >> www.casesofinterest.com, but casesofinterest.com points to the same >> public_html. HTTP_HOST = www.casesofinterest.com and >> SERVER_NAME=casesofinterest.com >> >> Note also that I have a second URL www.michaelrisch.com that points to >> the same server, but all redirects go to >> SERVER_NAME=casesofinterest.com >> >> So, my question is, why is SERVER_NAME given preference in $base_url >> and everywhere else where URL's are generated? Shouldn't HTTP_HOST >> get top billing? >> >> I would like to make this change to /lib/setup/absolute_urls.php: >> >> -$url_host = (isset($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST']; >> +$url_host = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; > > Well I suppose it makes sense to use the hostname you where contacted > with... > >> and also to fix this issue wherever else it is found (maybe even >> consolidating by pointing to $base_url or other variables set forth in >> absolute_urls). > > Sure ! > >> Am I missing something here? Any input appreciated. > > I don't think so... > > A+ > -- > Stéphane Casset LOGIDÉE sàrl Se faire plaisir d'apprendre > 1a, rue Pasteur Tel : +33 388 23 69 77 ca...@lo... > F-67540 OSTWALD Fax : +33 388 23 69 77 http://logidee.com > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Tikiwiki-devel mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > -- Adam |