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

The Editor editor at fast.st
Tue Nov 20 08:56:48 CST 2007


On Nov 20, 2007 9:20 AM, Benoit Dutilleul <benoit.dutilleul at googlemail.com>
wrote:

> 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
>
>
Hi Benoit!

I'm not an expert at  url redirects, but I 'm pretty sure they only deal
with the part of the url that follows the web domain, so you could get a
rule to change
http://www.web-farm.org/wiki/fields/WiCo/index.php/Lokhim/Sustainability
into http://www.web-farm.org/Sustainability<http://www.lokhim.net/Sustainability>but
not into
http://www.lokhim.net/Sustainability.  Also it looks like some other
problems in the way you set this up. But I'll let others weigh in on some of
those issues. I just think you need to get an answer for this problem first.

Cheers,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20071120/adb4b922/attachment.html 


More information about the pmwiki-users mailing list