[pmwiki-users] get rid of group Main from url

JB jbit at bitlink.com
Tue Nov 7 12:05:31 CST 2006


 > That's it.

Anno,  NO, That is not it.  What you posted does not work.
It only made it worse! The "Main." is still in the url
and now it displays "index.php" again!


Here is what works to remove "index.php" from the url

         # Eliminate "index.php" & "pmwiki.php" from URLs.
         $EnablePathInfo = 0;
         $ScriptUrl = "http://gnuzoo.org/stuffforsale/";

It changes my url from:
http://gnuzoo.org/stuffforsale/index.php?n=Main.OfficeTable

to:
http://gnuzoo.org/stuffforsale/?n=Main.OfficeTable

I want to try and make it look like:
http://gnuzoo.org/stuffforsale/?n=OfficeTable

   - get rid of the "Main.".



original quoted below
---------------

* Anno wrote, On 11/4/2006 10:20 AM:
> Step 1:
> create an index.php file in the same directory as pmiki.php containing this:
> <? include_once ('pmwiki.php');
> 
> Step 2:
> 
> have this in your local/config.php file:
> 
> $ScriptUrl = 'http://gnuzoo.org/stuffforsale';
> $PubDirUrl = 'http://gnuzoo.org/stuffforsale/pub';
> 
> $PagePathFmt = array(
>        '{$Group}.$1',           # page in current group
>        '{$DefaultGroup}.$1',    # page in default group (Main)
>        '$1.$1',                 # group home page
>        '$1.{$DefaultName}',     # group home page
> );
> 
> $pagename = MakePageName('Main.HomePage', $pagename);
> 
> $FmtPV['$PageUrl'] = 'PUE(($group==$GLOBALS["DefaultGroup"])
>                              ? "$ScriptUrl?n=$name"
>                                : "$ScriptUrl?n=$group.$name")';
> $FmtP["!\\\$ScriptUrl?n=$DefaultGroup/!"] = '$ScriptUrl';
> 
> That's it.





More information about the pmwiki-users mailing list