[pmwiki-users] .htaccess help
Athan
ssb at in.gr
Thu Nov 2 06:17:07 CST 2006
Hi,
I have the following problem, with redirects and pmwiki.
My host is configured with Apache server name: domain.com (www.domain.com is
a CNAME)
In domain root I use next rewrite rules, to always force www prefix.
Options All -Indexes
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
This works fine with all html and php files found in root and the
subdirectories.
PMwiki is installed in subdirectory /wiki where I have a second .htaccess
file (the proposed one from pmwiki.org)
RewriteEngine On
RewriteBase /wiki
# 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-z].*) pmwiki.php?n=$1 [QSA,L]
Everything works fine except that http://domain.com/wiki never turns to
http://www.domain.com/wiki
Even when entering http://www.domain.com/wiki in browser's address bar,
pmwiki cuts www from its home page.
In config.php everything is configured using the www prefix:
$ScriptUrl = 'http://www.domain.com/wiki';
$PubDirUrl = 'http://www.domain.com/wiki/pub';
$EnablePathInfo = 1;
Any idea ?
Thanks,
Athan
More information about the pmwiki-users
mailing list