[pmwiki-users] Having difficult with .htaccess files
Marc Cooper
gmane at auxbuss.com
Thu Jun 29 04:11:14 CDT 2006
phenotype said...
> Hi folks,
>
> I'm new to PmWiki, and I've been really happy with how good it looks
> and how easy it's been to configure (especially compared to the awful
> experience I had with trying to install phpWiki), but for some reason
> I can't get pretty URLs using .htaccess files calling mod_rewrite. I
> know mod_rewrite is enabled and is working, because I have a
> WordPress install that has pretty permalinks (also, I edited the
> httpd.conf to turn on .htaccess myself) but whenever I use the
> example .htaccess files from the PmWiki site, I just get dumped back
> to the directory listing. I can access the pmwiki.php file from
> there, and the URLs display like they should be, but clicking on them
> gives me a 404 error every time. I'm totally stumped!
>
> This is the .htaccess file I'm using right now:
>
> # Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
> RewriteEngine On
> # Define the rewrite base.
> 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]
>
> The /wiki directory is in my site root (/var/www/html/), and I want
> the wiki to appear at the /wiki directory, as you can tell.
>
> I'm running Apache 2.0 on a Fedora Core 2 based box, and it has PHP
> 4.3.11 installed on it.
Have you set:
$EnablePathInfo = 1;
$ScriptUrl = 'http://domain/path/to/pmwiki';
in your config.php?
Try without the RewriteBase. (Patrick suggested this to me and it turns
out that I only require this for wikis outside my site root tree.)
Are you running a farm or just the home wiki?
Please supply a copy of a failing URL, as this might provide useful
info.
(BTW, you can usually test whether rewrite is working on your pmwiki
directory by trying http://blah/pmwiki or http://blah/pmwiki/index.php,
which are covered by the first two re write rules.)
Hope that helps.
--
Best,
Marc
More information about the pmwiki-users
mailing list