[pmwiki-users] CleanUrls, again (was: Putting ".html" extensions...)

Patrick R. Michaud pmichaud at pobox.com
Fri Mar 3 18:29:27 CST 2006


On Fri, Mar 03, 2006 at 04:51:58PM -0700, H. Fox wrote:
> On 3/3/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > But I also think it doesn't have to be an "either-or" situation --
> > we can always do both.  Suppose we take the basic clean urls
> > .htaccess structure as sending non-lowercase urls to PmWiki:
> >
> >     # 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 ^$           ~someuser/pmwiki/pmwiki.php  [L]
> >     # Send requests for index.php to pmwiki.php.
> >     RewriteRule ^index.php$  ~someuser/pmwiki/pmwiki.php  [L]
> >     # Send requests to pmwiki.php, appending the query string part.
> >     RewriteRule ([^a-z].*)   ~someuser/pmwiki/pmwiki.php?n=$1  [QSA,L]
> 
> I like that this is shorter, but I don't like that it results in
> 
>     Bad Request
>     Your browser sent a request that this server could not understand.

It does?  Oh, I think I made a typo -- it should probably be anchored:

    RewriteRule ^([^a-z].*)   ~someuser/pmwiki/pmwiki.php?n=$1  [QSA,L]

Pm




More information about the pmwiki-users mailing list