Page 1 of 1
How to link Home to / instead of index.html?
Posted: Tue Dec 12, 2006 11:38 pm
by mustang
I'm using htaccess/mod_rewrite and '.html' page extension so urls look like domain.com/page-name.html.
All is fine except one problem, the 'Home" links go the url domain.com/index.html. I'd like them to go to domain.com to bring up the home page. For SEO purposes consistency thorugh the site is important.
Currently the 'Home' page is the default page. The page alias is 'index'.
Anyone point me to a fix for this?
Thanks,
mustang
Re: How to link Home to / instead of index.html?
Posted: Wed Dec 13, 2006 3:41 am
by mustang
I'm fine with the file intself being named index.html. However the links to Home should go to the root (/), not to /index.html.
It is certainly not good if some links on the site go to "domain.com", and some go to "domain.com/index.html" and serve up the same page. The correct method for SEo is to link to "domain.com" when targeting the home page.
Re: How to link Home to / instead of index.html?
Posted: Sun Jan 07, 2007 10:13 pm
by mustang
mark wrote:
Which ones go to "domain.com" ?...
None of the internal links go to domain.com. That's the problem. Internal links should go to domain.com, not domain.com/index.html, or domain.com/home.html.
When others link to the site, do they link to
www.domain.com/index.html? Or do they most likely link to
www.domain.com? Most of course will link to a
www.domain.com. The same should be done with links within the site. For SEO purposes, it's much better.
Anyone know of an easy way to change this?
Thanks!
Re: How to link Home to / instead of index.html?
Posted: Mon Jan 08, 2007 4:05 pm
by akronim
the trick i use i s this :
1. your default page i.e. index.html should not be visible in the menu
2. then you create a new page which is not a content one but is a link to yourseodomain.com/ and call it home (menutext = home),
and you put it wherever you like in your menu
too simple !!
bye
Re: How to link Home to / instead of index.html?
Posted: Mon Jan 15, 2007 1:18 am
by mustang
akronim wrote:
the trick i use i s this :
1. your default page i.e. index.html should not be visible in the menu
2. then you create a new page which is not a content one but is a link to yourseodomain.com/ and call it home (menutext = home),
and you put it wherever you like in your menu
too simple !!
bye
Works like a charm! Thanks!!
It would be nice if CMSMS would be changed in future so such a work-around is not needed everytime.
Thansk again, akronim !
Re: How to link Home to / instead of index.html?
Posted: Fri Jan 19, 2007 9:36 pm
by mustang
OK, having an issue with this work-around.
The 'currentpage' class is not being assigned to the Home link when it is the current page. I'm guessing that since 'Home' is simply a link now (using this work-around), it does not know if it is "currentpage" anymore. How can I get CMSMS to recognize it as the current page?
Thanks.
Re: How to link Home to / instead of index.html?
Posted: Thu Feb 15, 2007 1:49 pm
by kermit
mustang wrote:
I'm fine with the file intself being named index.html. However the links to Home should go to the root (/), not to /index.html.
It is certainly not good if some links on the site go to "domain.com", and some go to "domain.com/index.html" and serve up the same page. The correct method for SEo is to link to "domain.com" when targeting the home page.
this would be very nice to see.. and to clarify, it would link directly to the
SITE root, aka
$config['root_url'], not
domain root; as cmsms can be installed into a subdirectory.
be nice if it could be done with just .htaccess, but if not:
since
any page can be configured to be the site's "default" page, i'm guessing a check would need to be made before replacing the url.. something like: if a page alias = "index" (
and it's a top level page) then replace its url with
$config['root_url'] (add trailing slash), whenever and wherever that page's link is generated (menus, selflinks, etc) by cmsms.