Gossamer Forum
Home : Products : Links 2.0 : Discussions :

SE-friendly category.html on domain root

Quote Reply
SE-friendly category.html on domain root
Hi everyone,
I was wondering, can links 2.0 build the pages like this: www.domain.com/category.html instead of www.domain.com/Category/ ?? I think it will greately benefit SE rankings to have them on the root of the domain... Does anyone know how I can set it up like this???

Quote Reply
Re: [lethal] SE-friendly category.html on domain root In reply to
You mean make the URL's lowercase?
In db_utils.pl, change this sub as shown:


Code:
sub urlencode {
# --------------------------------------------------------
# Escapes a string to make it suitable for printing as a URL.
#
my($toencode) = shift;
$toencode =~ tr/[A-Z]/[a-z]/; #change all letters to lowercase
$toencode =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;
$toencode =~ s/\%2F/\//g;
return $toencode;
}

The other part of you question can be done, sort of, but keep in mind that www.domain.com/Category/ is a directory structure, meaning 'Category' is a directory, not just an html page. So, you could have www.domain.com/Category/index.html. Is that close enough?


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] SE-friendly category.html on domain root In reply to
Thanks PerlFlunkie for your reply. But I don't mean to make the url lowercase...
Actually, what I want is to have www.domain.com/business.html instead of www.domain.com/Business/index.html.

So whatever category I add in the admin panel, when building I would like to get www.domain.com/whatever_category.html instead of www.domain.com/whatever_category/index.html so that would have a html page in the root of the domain, instead having lots and lots of directories (one for each category). I believe that it will be easier to manage like this and it will also have a benefit with the SE rankings

Is that doable?


Last edited by:

lethal: Mar 27, 2008, 5:41 PM
Quote Reply
Re: [lethal] SE-friendly category.html on domain root In reply to
Well, that can be done, too, but you end up with all your pages in the same top-level directory. Not really a problem, I guess... Well, maybe it is: being that Links2 is built on the category structure, it may be difficult to remove that system. Everything is based on its' category, a directory that can be manipulated. Think of counting link numbers (per page), sorting, arranging output on pages, etc., all done based on category.

You may want to look into URL rewriting, which could probably do what you want, whithout having to re-code Links. I am not to familiar with the technique, but what you want it to do is remove the directory part when used as an URL, but still have it in place since that's how the site is built. Confused? Me too.

http://www.gossamer-threads.com/...?post=293838#p293838


Leonard
aka PerlFlunkie