[pmwiki-users] URL split and merge

123_dirk 123_dirk at web.de
Sun Nov 27 05:59:50 CST 2011


Am 27.11.2011 02:20, schrieb Tamara Temple:
> 123_dirk<123_dirk at web.de>  wrote:
>
>> Am 26.11.2011 20:38, schrieb Tamara Temple:
>>> 123_dirk<123_dirk at web.de>   wrote:
>>>> Hi,
>>>> i build a Wiki with the internal name system:
>>>> Group.MainLast,Child
>>> Is this the pattern for all the pages in your wiki? If not, things will
>>> get a bit complicated.
>> Most of them are just  Group.MainLast or Group.Main pages.
>> I split the $name in 2 new page names and than i work in the Wikipages
>> with this 2 names.
>> The child system is just a nice to have. In a closed internal Wiki at
>> work i use it.I manage this in my local System.
>>
>> To call this page with cleanURL i wrote a funktion to rename the pageurl.
>>
>>>> But now i will go online.
>>>>
>>>> I will use  cleanURL and the page should called like this:
>>>>
>>>> www.Test.com/group/main/last/child.html
>>>>
>>>> How can i change this URL back to the internal  System
>>>> "Group.MainLast,Child"  ?
>>> This can be difficult to do with just HTTP rewriting, I think. Although
>>> it is a pretty flexible system, I don't know that it can handle this.
>>>
>>> At first blush, I'd suggest a wrapper program, such index.php, to take
>>> the pathinfo and reconstruct the proper path to pmwiki, and then handing
>>> it off with a redirect to pmwiki.php.
>>>
>>> This should be able to handle anything external. But how you will get
>>> pmwiki to rewrite internal links as you wish is beyond me.
>>>
>>> I have to ask, what are your reasons for doing this?
>> I can't find the right place to place my program to do the name merge stuff.
>> Maybe you can tell me the place and the variable.
>> The  code to do this is not difficult and i will find a solution.
> I was just thinking, with cleanURLs, you should be able to have a path
> like http://example.com/group/main/list/child, which if your wiki was
> actually at the root of http://example.com, your pathinfo would then be
> /group/main/list/child, which you can get out of the $_SERVER array. If
> your main entry point into the wiki is index.php, that could very easily
> assemble the pathinfo back into Group.MainList,Child and you can hand
> this to pmwiki in a redirect.
>

Can you give me an example how to do this?

At the moment i make a inlude of pmwiki.php in the index.php.
I have no idea how i can do such a redirect.

Sorry my PHP and Web skills are not the best.


>> The reason is very easy, i will replace my HTML site.
>> And the structure of this site is www.test.com/avr/code/pid.html.
>> At the Wiki it is Avr.CodePid and somtimes Avr.CodeUart,Rs485
>> Well and now nobody sould see the difference between the old and the
>> new system.
>>
>> If this is working i can show this at work and maybe i can change this
>> Webpage too.
>>
>> Maybe i can extract the code tomorrow and if some one thing it sould
>> me a part of PMWIKI, than he can merge it to the code.
>>
>>
>> _______________________________________________
>> 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