|
|
|
date: Fri, 8 Aug 2008 22:33:35 +0100,
group: uk.net.web.authoring
back
Multiple URLs for single pages
Many of my pages can be accessed at URLs like:
www.example.com/something/widgets.htm
&
www.example.com/something/widgets
and Google Webmaster tools is warning me of duplicate meta-descriptions
and titles for those "two" pages.
My preference is for the latter form; can I add something to my
.htaccess file to the effect that:
*.htm redirects as "301" to *
Similarly, what about:
www.example.com/something/index.htm
&
www.example.com/something/
&
www.example.com/something
using:
*/index.htm redirects as "301" to *
&
*/ redirects as "301" to *
--
Andy Mabbett
Says "NO! to compulsory UK ID Cards": <http://www.no2id.net/>
and: "Free Our Data": <http://www.freeourdata.org.uk>
(both also on Facebook)
date: Fri, 8 Aug 2008 22:33:35 +0100
author: Andy Mabbett
|
Re: Multiple URLs for single pages
On Fri, 8 Aug 2008, Andy Mabbett wrote:
> Many of my pages can be accessed at URLs like:
> www.example.com/something/widgets.htm
> www.example.com/something/widgets
>
> My preference is for the latter form;
DefaultType text/html
AddDefaultCharset utf-8
#AddDefaultCharset iso-8859-1
Options -Multiviews
Name your file just "widgets" without any extension.
> Similarly, what about:
> www.example.com/something/index.htm
> www.example.com/something/
DirectoryIndex secretname
Rename "index.htm" to "secretname".
> www.example.com/something
That's done by the server automatically.
--
In memoriam Alan J. Flavell
http://groups.google.com/groups/search?q=author:Alan.J.Flavell
date: Mon, 11 Aug 2008 16:57:08 +0200
author: Andreas Prilop
|
Re: Multiple URLs for single pages
Andreas Prilop wrote:
> DefaultType text/html
> Options -Multiviews
> Name your file just "widgets" without any extension.
Better than that, if you're using apache and you get the configuration
right, you can reference any item (text file, graphic, flash,...) without
its extension, but continue to name it sensibly.
Consider map.html and map.jpg. You could reference http://blah.../map
which in turn contained an <img src="map">. It's particularly great
for multi-language sites where the browser and server negotiate for a
preferred language (you'd have map.en.html, map.fr.html, map.de.html...)
Chris
date: Tue, 12 Aug 2008 20:50:55 +0100
author: Chris Davies
|
Re: Multiple URLs for single pages
In message , Chris Davies
writes
>Andreas Prilop wrote:
>> DefaultType text/html
>> Options -Multiviews
>
>> Name your file just "widgets" without any extension.
>
>Better than that, if you're using apache and you get the configuration
>right, you can reference any item (text file, graphic, flash,...)
>without its extension, but continue to name it sensibly.
Which was my question: how do I do that?
--
Andy Mabbett
Says "NO! to compulsory UK ID Cards": <http://www.no2id.net/>
and: "Free Our Data": <http://www.freeourdata.org.uk>
(both also on Facebook)
date: Fri, 15 Aug 2008 22:24:27 +0100
author: Andy Mabbett
|
Re: Multiple URLs for single pages
In message , Chris Davies
writes
>Better than that, if you're using apache and you get the configuration
>right, you can reference any item (text file, graphic, flash,...)
>without its extension, but continue to name it sensibly.
Andy Mabbett wrote:
> Which was my question: how do I do that?
Include mod_alias, mod_include, mod_negotiation. Then change or add
these lines (I have them in conf.d/local on my Debian box):
AddLanguage en-GB .en-GB
AddLanguage en-US .en-US
LanguagePriority en-GB en-US en fr ...
ForceLanguagePriority Prefer Fallback
Then name your HTML files, e.g. index.en-gb.html and index.fr.html, and
your images, e.g. picture.en-gb.jpg and picture.fr.jpg. Ensure you refer
to the files without any extension.
You might have to add plain "index" to your DirectoryIndex list - I
can't confirm this right now.
Chris
date: Wed, 20 Aug 2008 19:14:47 +0100
author: Chris Davies
|
|
|