[pmwiki-users] Need help with Clean URLS

H. Fox haganfox at users.sourceforge.net
Mon Apr 24 23:27:10 CDT 2006


On 4/24/06, Philip Stitt <phil at octopusmusic.com> wrote:
> Hello. I'm trying to achieve clean URLs. I've renamed "pmwiki.php" to
> "index.php", which is in my main web folder (so there's no "path" to
> it).

As it says in the documentation, you are asking for trouble by doing
that.  Create a wrapper script instead -- or if you are using clean
URLs you don't need even need to do that.

> This is what I've added to my .htaccess file (which is also in the main
> web folder):
>
> RewriteEngine On
> RewriteBase /
> RewriteRule ^$           index.php  [L]
> RewriteRule ^index.php$  index.php  [L]
> RewriteRule ^([^/a-z].*) index.php?n=$1  [QSA,L]
>
> and this is what's in my local/config:
>
> <?php if (!defined('PmWiki')) exit();
> $EnablePathInfo = 1;
> $ScriptUrl = "http://mysite.com";
>
> The result: when I click links from the home page, I get clean URLs in
> my browser, but to non-existant pages. If I type in the
> "index.php?n=GroupName.PageName", that still works.

Comparing your lines to the ones here

http://www.pmwiki.org/wiki/Cookbook/CleanUrls#docroot

makes the last line look suspect.  What is the web path to pmwiki.css?
 I suspect it's not http://mysite.com/pub/skins/pmwiki/pmwiki.css . 
If not, then the last line is missing some path information.

Hagan




More information about the pmwiki-users mailing list