[pmwiki-users] Clean URLs (Another question from the newbie)
Tom Hayden
tom.hayden.iii at mail.airmail.net
Tue Dec 4 22:52:40 CST 2007
Eric,
After going over everything you suggested, I finally went to the
httpd.conf file and began looking through it. After scanning back and
forth several times I came across the following section:
# This should be changed to whatever you set DocumentRoot to.
#
<Directory /var/www/>
I changed it to:
<Directory /website/>
to match DocumentRoot /website
And everything worked fine.
If you had not suggested checking the server configuration, I might
never have found this. Thanks for your help.
Eric Celeste wrote:
> The only other problem I see is potentially the leading "/" on the
> rewritten address. In other words, all the "/singles" below should
> probably be "singles" instead (assuming "singles" is not actually at the
> root of your hard disk).
>
> Really, to debug this would require more detailed information using only
> full paths.
>
> What is the full path of your pmwiki install?
> (for example "/home/efc/www/pmwiki/pmwiki.php")
>
> What is the URL you would like to be "home" for your wiki?
> (for example " http://mydomain.org/Main/HomePage")
>
> What is the full path of your ".htaccess" file?
> (for example "/home/efc/www/.htaccess")
>
> Assumption: your server is configured so that a request of a page from
> your domain actually reaches your .htaccess file.
>
> ...Eric
>
> On 12/4/07, *Sameer Kumar* <skumar at eharch.com
> <mailto:skumar at eharch.com>> wrote:
>
>
>
> <Snip>
> 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...
>
> <snip>
>
> 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
>
> <snip>
>
> Eric,
>
> I have exactly the same situation as Tom's description above and I
> have the .htaccess file in my root directory. I have followed all
> the instructions that I have found (my htaccess file looks exactly
> the same as above) and can also confirm that mod_rewrite is also
> activated for my Apache install.
>
> However, I cannot get rid of a "?n=" from my URLs. For example, my
> URLs read as:
>
> http://hip.eharch.com/?n=Materials/Materials
>
> instead of
>
> http://hip.eharch.com/Materials/Materials
>
> which I would prefer.
>
> Would you have any ideas or suggestions regarding getting rid of the
> "?n=" ?
>
> Thanks. Sameer
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
--
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
More information about the pmwiki-users
mailing list