[pmwiki-users] Need help w/ clean URLs for wikifarm field in subdomain

Oneida Kincaid oneida.kincaid at verizon.net
Sat Feb 19 14:42:22 CST 2005


I've set up a wikifarm with three wikifields in three
subdomains (e.g., www.garden.awok.org). Everything is
working fine and I get clean URLs for the main domain (e.g.,
www.awok.org/Main), except I can't get clean URLs to work
for the wikifields in the subdomains. The wikifield URLs I
get look like this -

http://www.garden.awok.org/garden/index.php/Main

If possible, I'd like them to be like -

http://www.garden.awok.org/Main

Unfortunately, my knowledge of mod rewrite is pretty much
limited to cut'n'pasting from example code. I've pasted in
below the relevant mod rewrite code that I've tried from the
htaccess files in the main domain directory and one of the
subdomains, as well as the directory structure.

** htaccess file in main domain directory - gives clean URLs
for main domain wiki but not for subdomain wikifields **

RewriteEngine on
Options +FollowSymlinks
RewriteBase /

RewriteCond %{HTTP_HOST} garden.awok.org
RewriteCond %{REQUEST_URI} !garden/
RewriteRule ^(.*)$ garden/$1 [L]

RewriteRule ^([A-Z].*) /index.php?n=$1 [L,qsappend]
RewriteRule ^$ index.php [L,qsappend]

** htaccess code for wikifield in subdomain **

RewriteEngine on
RewriteRule ^([A-Z].*) /index.php?n=$1 [L,qsappend]
RewriteRule ^$ index.php [L,qsappend]

(Note: All of the subdomains have an index.php file that
points to the main PmWiki index.php file (i.e., <?php
include('/www/a/awokorg/htdocs/index.php'); ?>) and
$EnablePathInfo is set to 1 in farmconfig.php.)

** Directory structure (simplified) **

htdocs
--garden <= directory where the subdomain files are
----local
----wiki.d
----.htaccess
----index.php
--local            /
--pub             / main pmwiki directories in main domain
----guiedit      /
----skins        /
------awok     /
------garden   /
--scripts        /
--wiki.d         /
.htaccess
index.php (renamed pmwiki.php file)

Any help from someone initiated into the mysteries of mod
rewrite would be very much appreciated.

Thanks,
Oneida




More information about the pmwiki-users mailing list