[pmwiki-users] .htaccess file

Petko Yotov 5ko at 5ko.fr
Tue Dec 29 00:38:03 CST 2009


On Tuesday 29 December 2009 06:21:56 Wade Hudson wrote:
>  No luck.     
> 
>  My config file which is on public_html/local reads:

Just this :

  $EnablePathInfo = 1;
  $ScriptUrl = 'http://charternetwork.org';

  # this one is probably not required
  $PubDirUrl = 'http://charternetwork.org/public_html/pub';

Remove all other lines containing $ScriptUrl or $EnablePathInfo or $PubDirUrl.

(The line with $UrlScheme in the archive works with all servers if you copy it 
correctly, which you didn't do -- but never mind.)


>  My .htaccess file which is on public_html reads:

This one is very wrong - just delete it. You should create another .htaccess 
file in the ROOT directory, like I said in my last message, NOT in the 
SUBdirectory. And place inside ONLY this:

  RewriteEngine On
  RewriteBase /

  # requests for example.net / , send directly to PmWiki and exit
  RewriteRule ^$  /public_html/pmwiki.php  [QSA,L] 

  # requests for example.net/Something
  RewriteCond %{REQUEST_FILENAME} !-f        # if not a file,
  RewriteCond %{REQUEST_FILENAME} !-d        # and not a dir,
  RewriteCond %{REQUEST_FILENAME} !-l        # and not a link,

  # and looks like a PmWiki request, send to PmWiki
  RewriteRule ^([A-Z0-9\x80-\xFF].*)$  /public_html/pmwiki.php?n=$1  [QSA,L]


>  What did I do wrong? Thanks again.

You invented and added a $ScriptUrl line longer than what you need, and 
modified the wrong .htaccess file to a slightly invalid configuration. :-)

I suspect the problem may be that our documentation is not clear enough, or 
that we somehow assume administrators/webmasters have at least intermediate-
level of knowledge about what a website is. 
If we're wrong, we should change. :-) Suggestions welcome.


Petko

P.S. If you want to learn more about the Rewrite Engine in Apache, see these 
pages:

  http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
  http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html



More information about the pmwiki-users mailing list