[pmwiki-users] Group-specific URL rewrite with mod_rewrite?

Benoit Dutilleul benoit.dutilleul at googlemail.com
Tue Nov 20 08:20:07 CST 2007


Dear pmwiki users,

I have managed to thinker one .htaccess to start doing what I wanted which
is, in summary, to transform this URL:
http://www.web-farm.org/wiki/fields/WiCo/index.php/Lokhim/Sustainability
into
http://www.lokhim.net/Sustainability

Here was my rationale:
[1] First of all, I needed a directory to point my domain to and to put my
.htaccess file. I chose to add a MultiDom/ folder in the WiCo field of my
farm.
[2] Then, since the group I want to point to is called Lokhim, I defined a
Lokhim/ folder in MultiDom/
[3] In the folder http://www.web-farm.org/wiki/fields/WiCo/MultiDom/Lokhim/,
I added the following .htaccess:

# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
RewriteEngine On
# Define the rewrite base
RewriteBase /
# Send requests without parameters to the relevant homepage
RewriteRule ^$           /wiki/fields/WiCo/index.php?n=Lokhim.HomePage  [L]
# Send requests to pmwiki.php, appending the query string part.
RewriteRule ^([A-Z0-9\xa0-\xff].*)$ /wiki/fields/WiCo/index.php?n=$1
[QSA,L]

This works if you access the URL
http://www.web-farm.org/wiki/fields/WiCo/MultiDom/Lokhim/
However, I set up the subdomain lokhim.web-farm.org to point to this folder
and I get the following error: The requested URL /wiki/fields/WiCo/index.php
was not found on this server.

Can someone help me to get the .htaccess to work with the subdomain?
Thanks a lot,

Benoit




2007/11/18, Benoit Dutilleul <benoit.dutilleul at googlemail.com>:
>
> Dear all,
>
> I got no reply to my previous message. Would there be a specialist of
> mod_rewrite to help me set this up properly?
> Thanks a lot in advance,
>
> Benoit
>
> ---------- Forwarded message ----------
> From: Benoit Dutilleul <benoit.dutilleul at googlemail.com>
> Date: 13 nov. 2007 16:43
> Subject: Group-specific URL rewrite with mod_rewrite?
> To: pmwiki-users at pmichaud.com
>
> Dear all,
>
> I would like to set-up group-dependent CleanURL using .htaccess +
> mod_rewrite in order to rewrite the following URL:
> http://www.web-farm.org/wiki/fields/WiCo/index.php/Lokhim/Sustainability
> into:
> http://www.lokhim.net/Sustainability
>
> This is a case slightly more complex than what is described in the
> CleanURL cookbook and I am not so familiar with the mod_rewrite synthax.
> Would there be somebody able to help me on this?
> Kind regards,
>
> Benoit
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20071120/158b91f3/attachment.html 


More information about the pmwiki-users mailing list