[pmwiki-users] I need help with clean URLs

info at theburroughsproject.com info at theburroughsproject.com
Mon Aug 14 18:42:49 CDT 2006


*** PATRICK WROTE:

> You might try removing the RewriteBase line

I tried that and it had no effect

> Also, remove any index.php file that you may have in your
> document root, and see if the url
> 
>    http://www.example.com/index.php
> 
> works (you should see the PmWiki home page if it does).
> If that url doesn't work, try creating a _completely empty_
> index.php file and see what happens.

I didn't have an index.php file anywhere, and
"http://www.example.com/index.php" worked fine.
I went ahead and created a blank index.php file, just to see what
happens, and there was no effect at all.

> I'm also wondering if the Apache webserver at GoDaddy is doing
> the equivalent of "AcceptPathInfo Off" and returning the 404
> error before ever trying the .htaccess or the mod_rewrite rules.  
> You could try adding
> 
>    AcceptPathInfo On
> 
> to your .htaccess and see if that resolves the 404.

I added the line:
AcceptPathInfo On
to the top of the .htaccess file. This produced a 500 Internal Server
error.

> Also, do you happen to know what version of Apache is being used?
> (You can set $EnableDiag=1; in local/config.php, then use ?action=phpinfo
> to have PmWiki report the Apache version and configuration.)

It appears to be Apache 1.3.33 

> Lastly, perhaps you could send me (privately if you want) the
> actual url of the site so I could take a look?  

Absolutely, it's at http://www.howtofreaks.com

*** PICO WROTE:

> I'm using GoDaddy and got my CleanURLS working last night (after having the
> exact same problem).  So, presumably, that should take the hosting issues off
> the table.  (But if you need more info to compare hosting settings, I can
> provide them).

That's very encouraging! I'm using the deluxe hosting with php and cgi,
with "hosting configuration 2.0" enabled. I have no subdomains
configured, and I'm not using farms. If you could give me more info
about it, that would be great, as I currently have no other leads to go
on.

>>> In my root document folder I have only two items: one folder named
>>> "pmwiki", and one .htaccess  
>>> file. This is an exact copy of what's in my .htaccess file:
>>> 
>>> # Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
>>> RewriteEngine On
>>> # The rewrite base will be the document root.
>>> RewriteBase /
>>> # Send requests without parameters to pmwiki.php.
>>> RewriteRule ^$           pmwiki/pmwiki.php  [L]
>>> # Send requests for index.php to pmwiki.php.
>>> RewriteRule ^index\.php$ pmwiki/pmwiki.php  [L]
>>> # Send requests to pmwiki.php, appending the query string part.
>>> RewriteRule ^([^/a-z].*) pmwiki/pmwiki.php?n=$1  [QSA,L]
>> 
>> This looks exactly right to me.  You might try removing the
>> RewriteBase line and see if that helps.
>
> FWIW, this may have been part of the problem in my setup.  I ended up 
> changing the RewriteBase line from "/user1" to "/" on an Example One 
> setup, but my setup was very different: WikiFarm, fields located at
> www.example.com/user1 etc, subdomains (setup through GoDaddy control panel) 
> that make "www.example.com/user1" appear at "user1.example.com", and no 
> separate pmwiki folder beneath the field subdomains
> "www.example.com/user1/field.php" instead of
> "www.example.com/user1/pmwiki/field.php")

I'm using: "RewriteBase /" as well, but I'm using an example 3 setup.

> I note the only things that are missing from his .htaccess file, as 
> compared with mine, are the entries for 
>
>> Also, remove any index.php file that you may have in your
>> document root, and see if the url
>> 
>>     http://www.example.com/index.php
>> 
>> works (you should see the PmWiki home page if it does).
>> If that url doesn't work, try creating a _completely empty_
>> index.php file and see what happens.
>>
>
> Again, FWIW, that was part of the process I followed in fixing mysetup. 
> (Unfortunately, I can't say exactly which change fixed my setup, and I 
> wasn't able to backtrack and re-break my setup to identify the exact fix).

I'm not sure I follow you, Pico... what's missing from my .htaccess
file? I have no index.php anywhere, but when I go to
www.example.com/index.php, it successfully shows my Main.HomePage. I'm
not sure what you were saying - what was it that "was part of the
process" you followed that fixed your setup?

> Hey, wait a minute, while you are at it, shouldn't you look for and delete,
> or rename, any of the other directory indexes that might be getting 
> called before index.php.  On GoDaddy, they supply a welcome.html file with 
> new accounts.  On some servers, index.php can appear pretty far down on 
> the list of directory indexes (I see one list that places index.php at 
> 9 of 13 on Unix).  So, specifically, I would look for any files that start 
> with index.* welcome.* and default.* and delete, move, or rename them.  
> Are there any others I missed?

I have deleted all of that, and everything else I could. There is a
folder called "stats" that I cannot delete (and shouldn't make any
difference). Other than that, there are only 2 things in my main
directory: My .htaccess file, and my "pmwiki" folder, which contains a
fresh install of PmWiki 2.1.12, which I have not altered or added to in
any way except to add a config.php file (which is at
/pmwiki/local/config.php) which has this (and only this) in it:

<?php if (!defined('PmWiki')) exit();
## Use "Clean URLs".
$EnablePathInfo = 1;
$ScriptUrl = "http://www.howtofreaks.com";
## more configuration settings...
$EnableDiag=1;

And that's it - nothing more, nothing less. I suppose if it came down to
it, Pico, I could create a new account that was configured just like
yours, and try to figure it out that way... at least I know now it can
work at godaddy, which is great.

Thanks,
Phil





More information about the pmwiki-users mailing list