[pmwiki-users] Clean URLs (Another question from the newbie)

Eric Celeste efc.dev at gmail.com
Tue Dec 4 10:35:08 CST 2007


I believe you want the RewriteBase to be the root as served rather than the
root as stored. Try "RewriteBase /" instead.
Note, the should also allow "http://localhost" without the "index.php" to
bring up your site.

Also, for this to work your Apache server on the localhost must have
mod_rewrite activated. You might want to check to be sure this is the case.

...Eric

On 12/3/07, Tom Hayden <tom.hayden.iii at mail.airmail.net> wrote:
>
> I am attempting to create "clean URLs" for my website. I am currently
> developing on my home machine to get all the bugs worked out before I
> transfer everything to the real site.
>
> The script is located in:
> /website/singles/pmwiki.php
> and the "direct" URL is:
> http://localhost/singles/pmwiki.php
>
> Following the directions in the clean URL cookbook I set up my .htaccess
> file in /website as follows:
>
> # Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.
> RewriteEngine On
> # The rewrite base will be the document root.
> RewriteBase /website
> # Send requests without parameters to pmwiki.php.
> RewriteRule ^$           /singles/pmwiki.php  [L]
> # Send requests for index.php to pmwiki.php.
> RewriteRule ^index\.php$ /singles/pmwiki.php  [L]
> # Don't rewrite requests for any files, directories, or symbolic
> # links (shortcuts) that exist on the filesystem.
> # RewriteCond %{REQUEST_FILENAME} !-f
> # RewriteCond %{REQUEST_FILENAME} !-d
> # RewriteCond %{REQUEST_FILENAME} !-l # Send requests to pmwiki.php,
> appending the query string part.
> RewriteRule ^([A-Z0-9\xa0-\xff].*)$ /singles/pmwiki.php?n=$1  [QSA,L]
>
> I set up my /website/singles/local/config.php file as follows:
>
> <?php if (!defined('PmWiki')) exit();
> ## Use "Clean URLs".
> $EnablePathInfo = 1;
> $ScriptUrl = "http://localhost";
> ## more configuration settings...
>
> Then, when I try to load http://localhost/index.php, I get /index.php
> can not be found on this server.
>
> Does any one have any suggestions as to what I might be doing wrong?
> I would apprecaite any help I can get.
>
>
> --
> Tom Hayden III
>
> Coherent solutions for chaotic situations
>
> tom.hayden.iii at mail.airmail.net
> 214-435-4174
>
> 2636 Verandah Ln.
> Apartment 1431
> Arlington Texas, 76006
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20071204/9f45752a/attachment.html 


More information about the pmwiki-users mailing list