[pmwiki-users] New PmWiki user. Shorting URL problems

Joachim Durchholz jo at durchholz.org
Tue Dec 13 09:10:23 CST 2005


Malkavian schrieb:
> I have a problem shorting the URL, I have used the "Thecnique 3: Apache 
> Configuration" from this web http://www.pmwiki.org/wiki/Cookbook/CleanUrls
> in my personal server, and I obtained 
> http://malkavian.homelinux.org/pmwiki/index.php/Main/WikiSandbox URLs
> 
> In   /etc/apache2/sites-enabled/000-default   I wrote:

Sounds like you're using Debian, or a Debian-based distribution.
And you're admin, else you wouldn't have write access to that file :-)

>         <Directory /var/www/pmwiki/>
>                 Options FollowSymLinks
>                 AllowOverride Options
>         </Directory>
> 
> And I made a link 
> /etc/apache2/mods-enabled/rewrite.load -> ../mods-available/rewrite.load

The command
   a2enmod rewrite
would have been simpler :-)

To switch rewriting off, use
   a2dismod rewrite

Did you do
   /etc/init.d/apache2 force-reload
or (equivalently, I think)
   /etc/init.d/apache2 restart
after doing the change? Apache won't automatically detect changes in the 
configuration files (with the exception of changes in .htaccess, which 
will take effect immediately - Apache rereads .htaccess files for every 
request).

> But if I define in  local/config.php
> 
> $ScriptUrl = '/pmwiki';
> $PubDirUrl = '/pmwiki/pub';
> 
> (or the same with complete webpage route) I obtain
> http://malkavian.homelinux.org/pmwiki/Main/WikiSandbox   links but they don't 
> work and give me Error404.

$ScriptUrl will just affect how PmWiki constructs links to other PmWiki 
pages; it doesn't map the URLs. From your site, I'd say that $ScriptUrl 
is set correctly.

The problem is probably somewhere in the Apache configuration.

Try looking into /var/log/apache2/error_log. It should tell you what 
file Apache was trying to access when giving that error.
You could also use the RewriteLog directive to make the rewrite engine 
log its activities. That way, you'll see what rules were triggered for 
what URLs.

Regards,
Jo




More information about the pmwiki-users mailing list