[pmwiki-users] CamelCaseToLowerCase in Router.php with Apache mod-rewrite module

Carlos AB cabsec.pmwiki at gmail.com
Tue May 11 13:45:43 CDT 2010


I should have asked the standard questions first... Here it is.

What is your pmwiki version ?

Can we look your wiki site ?

Can we look at your .htaccess file?

What else have you included in config.php ?

So others can help you too.

On 5/11/10, Benoit St-Pierre <benbonben at gmail.com> wrote:
> Thanks!
>
> I'll drop router.php, but why, for curiosity's sake?

The reason is to test it with a clean config.php, since I haven't used
router.php .

It's just good practice when you're having problems with pmwiki or a
particular recipe.

You don't have to drop the use of router.php forever, it's just for testing.

> ***
>
> But now, I have another question.  In the documentation, it says:
>
>> (Beware, if you do NOT uppercase the first letter of your pagenames, the
>> wiki will stop recognizing them as files, and you will need to alter the
>> variables:
>
>     $GroupPattern = '[\\w]*(?:-\\w+)*';
>     $NamePattern = '[\\w]*(?:-\\w+)*';
>
> Later on, it says to include:
>
>> $MakePageNamePatterns = array(
>     "/'/" => '',						# strip single-quotes
>     "/[^[:alnum:]_-\\s]+/" => '',				# convert non-alnums to spaces
>     "/([\\w]+)/e" => "strtolower('$1')",			# make all lowercase
>     "/\\s+/" => '_'						# convert spaces to underscores
> );
>
> $GroupPattern = '[\\w]*(?:-\\w+)*';
> $NamePattern = '[\\w]*(?:-\\w+)*';
>
> Aren't these two advices contradictory?
>
> Besides, it seems that there is a side-effect, underlined by Kathryn
> Andersen :
>
>> The downside of this is that all the pages in PmWiki and Site will no
>> longer be found. I'm not sure how to get around this.
> I am not sure what she means, but it seems to me that what one needs
> to do, then, is simply to rename every file.  Am I right?

Just tested it and for me it is not a great idea anymore,  maybe
others can help you better than me .

> ***
>
> After a bit of testing, it seems I am not right.  Since I haven't done
> so many pages, and that those have to be renamed anyway (I am
> revamping my groups), it's not that much of a problem.  But my overall
> impression is that all the pages will have to be redone.
>
> In any case, it would be interesting to have some reassurance as to
> the Main.HomePage and Site pages.
>
> The page http://www.pmwiki.org/wiki/Cookbook/AlternateNamingScheme is
> very important, IMHO, as lowercase-with-hyphens URI are becoming very
> popular.  The explanation should be clarified.

why is it so popular? SEO?

> Thank you for all the great work and the great tool !
>
> Best regards,
>
> Ben

Maybe you should wait for some more ideas, instead of go ahead and
change all your wiki files.

Best regards,

CarlosAB



More information about the pmwiki-users mailing list