[pmwiki-users] Adjust home page url to "/"

Eemeli Aro eemeli at gmail.com
Wed Mar 25 08:27:07 CDT 2009


I use this to solve all my problems:

$FmtPV['$PageUrl'] = '($pn=="Main.HomePage")
  ? "$ScriptUrl/"
  : ( ($name==$group)
    ? "$ScriptUrl/$group"
    : "$ScriptUrl/$group/$name" )';
if ( strpbrk($pagename,'./') === FALSE ) $EnableFixedUrlRedirect = 0;

The first part corrects all internal links to point to Main.HomePage
as '/' instead of '/Main/HomePage' and Group.Group as '/Group' instead
of '/Group/Group'.

The second part stops PmWiki from auto-redirecting from '/Group' to
'/Group/Group' inside ResolvePageName() when it does find a matching
page. Any old links to '/Main/HomePage' etc. will of course still
work.

eemeli


2009/3/25 Ed W <lists at wildgooses.com>:
> Hi, anyone got a suggestion on how to make the home page become just the
> bare url "/".
>
> Situation is that I set "/" to be a 301 redirect to "/Main/HomePage" and
> immediately plummeted in google rankings on the home page.  Previously I
> had "/" duplicate the content from "/Main/HomePage", ie both go to the
> same place, but this was apparently disrupting the google rankings due
> to duplicated content and the internal links not being to the front page
>
> Any thoughts?
>
> Cheers
>
> Ed W
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



More information about the pmwiki-users mailing list