[pmwiki-users] I need a little help with lower-case clean URLs

ABClf languefrancaise at gmail.com
Thu Nov 17 16:49:11 CST 2011


Hi Rod,

You may want to "reply to all" (including pmwiki list) when replying ;
lot of users here are more experienced than me and could share better
ideas (or may be interested in your solutions).

Gilles.


2011/11/17  <redisthecat at lavabit.com>:
> Oh, thank you very much for this, seems just perfect! Though, I am trying
> it right now and it is not working for Group names, just for Page names.
> Perhaps it is some bug or incompatibility with the current version of
> PmWiki (since this cookbook was last updated in 2008). I'll try changing
> the PHP code. In the last case, I'll try to contact the cookbook author.
>
> Thanks a lot, again!
>
> Rod
>
>
>
>
>> Hi Rod,
>>
>> Maybe try this one : http://www.pmwiki.org/wiki/Cookbook/CaseCorrection ?
>>
>> It looks like it does what you are looking for : "CaseCorrection
>> handles mistakes of case in PmWiki addresses (eg. homepage instead of
>> HomePage) by looking for a case-insensitive match in all of a wiki's
>> pages. If a match is found, the user is silently redirected to it."
>>
>> Gilles.
>>
>> 2011/11/17  <redisthecat at lavabit.com>:
>>> Hi, Gilles.
>>>
>>> Thank you for the answer, but this method seems to imply in deep changes
>>> to my wiki, such as completely replacing the default namescheme and
>>> Markup. Actually, I am looking for a superficial solution for visitors
>>> coming up, sharing my URLs and guessing page addresses by typing
>>> directly
>>> on the address bar without getting 404 errors related to upper cases,
>>> and
>>> at the same time not imposing any rule changes to my current wiki users
>>> accostumed to the PmWiki.
>>>
>>> I'm looking for a minimalistic solution, and figured that just by
>>> changing
>>> the .htaccess file would be better to solve the particularities I'm
>>> looking for. But I don't quite know how to work with .htaccess files. I
>>> tried some examples on the Clean URLs solutions on PmWiki.org, but I
>>> found
>>> the explanations quite confusing - even on the Talk pages and Archives.
>>>
>>> I actually think that all I need is to just make some little adjustments
>>> on the line: "RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1
>>> [QSA,L]", but I have no idea what exactly to change there...
>>>
>>> Anyway, thanks for the help.
>>>
>>> Summing up, what I want is: that when someone types an address directly
>>> on
>>> the browser's address bar, it wouldn't make any difference if the
>>> visitor
>>> typed it using upper case (Main/HomePage) or not (main/homepage): they
>>> would access the exact same page. It would be just perfect (though
>>> optional) if the wiki would automatically redirect/replace the upper
>>> case
>>> address by the lower case, making it compliant to the largerly practised
>>> lowercase URLs. I am going to implement Disqus comments (disqus.com, as
>>> well as other third party services), which actually looks for the page
>>> address in order to create the comments box, and I'm not sure if it will
>>> mess everything by creating diferrent comment boxes for pages using
>>> lowercase AND uppercase addresses.
>>>
>>> Sorry for my English, and again, thanks in advance for any help
>>>
>>> Rod
>>>
>>>
>>>
>>>
>>>> You may want to write your own $MakePageNamePatterns ;
>>>> http://www.pmwiki.org/wiki/Cookbook/AlternateNamingScheme
>>>> should help you.
>>>>
>>>> Excerpt :
>>>>
>>>> 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+)*';
>>>>
>>>>
>>>> Gilles.
>>>>
>>>>
>>>>
>>>>
>>>> 2011/11/17  <redisthecat at lavabit.com>:
>>>>> Hi. Does anybody know how can I get clean URLs in lower-case, like
>>>>> "http://mysite.com/main/homepage" instead of
>>>>> "http://mysite.com/Main/Homepage" ? Here's my .htaccess file:
>>>>>
>>>>> # Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
>>>>> RewriteEngine On
>>>>> # Define the rewrite base.
>>>>> RewriteBase /sites/rodrigomolinaro
>>>>> # Send requests without parameters to pmwiki.php.
>>>>> RewriteRule ^$ pmwiki.php [L]
>>>>> # Send requests for index.php to pmwiki.php.
>>>>> RewriteRule ^index\.php$ pmwiki.php [L]
>>>>> # Send requests to pmwiki.php, appending the query string part.
>>>>> RewriteRule ^([A-Z0-9\xa0-\xff].*)$ pmwiki.php?n=$1 [QSA,L]
>>>>>
>>>>> Thank you for any help!
>>>>>
>>>>> Rod
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> pmwiki-users mailing list
>>>>> pmwiki-users at pmichaud.com
>>>>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> ---------------------------------------
>>>> | A | de la langue française
>>>> | B | http://www.languefrancaise.net/
>>>> | C | languefrancaise at gmail.com
>>>> ---------------------------------------
>>>>
>>>> ____________________________________________________________________________________
>>>> Find wellsfargomortgage Online Get Started Now.
>>>> http://click.lavabit.com/ctqpmi8snjoo5cjebtc79w4z6s3rifmn8sxmrmuyn54nww78bhub/
>>>> ____________________________________________________________________________________
>>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>>
>> ---------------------------------------
>> | A | de la langue française
>> | B | http://www.languefrancaise.net/
>> | C | languefrancaise at gmail.com
>> ---------------------------------------
>>
>> ____________________________________________________________________________________
>> We compare the best offers just for U. Our top 5 selection. Take the
>> chance to
>> make a good deal!
>> http://click.lavabit.com/ki87rmqryg5qch1mr3ofhpfwnokqjmkmmda8rsmn3y9hwjf1xb4y/
>> ____________________________________________________________________________________
>>
>
>
>
>



-- 

---------------------------------------
| A | de la langue française
| B | http://www.languefrancaise.net/
| C | languefrancaise at gmail.com
---------------------------------------



More information about the pmwiki-users mailing list