<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.gmailquote
        {mso-style-name:gmail_quote;}
span.q
        {mso-style-name:q;}
span.e
        {mso-style-name:e;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Tahoma","sans-serif";
        color:#215868;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Tahoma","sans-serif";
        color:#215868;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:#215868'>Oh! And I forgot to mention, I have confirmed that my “EnablePathInfo
= 1” is correctly set.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:#215868'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> pmwiki-users-bounces@pmichaud.com
[mailto:pmwiki-users-bounces@pmichaud.com] <b>On Behalf Of </b>Sameer Kumar<br>
<b>Sent:</b> Tuesday, December 04, 2007 5:01 PM<br>
<b>To:</b> Eric Celeste<br>
<b>Cc:</b> pmwiki-users@pmichaud.com<br>
<b>Subject:</b> Re: [pmwiki-users] Clean URLs (Another question from the
newbie)<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><a
href="http://hip.eharch.com/Main/Main">http://hip.eharch.com/Main/Main</a> does
work and you can try it again (I modified a minor issue). <o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'>What I meant by ‘typed
in manually’ is that when you click on any of the sidebar links like
‘Projects’ or ‘Materials’ etc., the URL of the page
that opens has the “?n=” in it. However, if you manually delete
these three characters, the link still points to the same page. <o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'>Moreover, if you click on the
topmost header link like “Projects/” in the Projects/Projects page,
it goes to a URL without the “?n=”. But that I think was a
modification made in the skin template, after suggestions on this mailing list.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'>Having tried all that I could,
I too am getting the feeling that this may have something to do with my installation
of PHP etc. But I am too much of a newbie to try to do something about it.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'>I really appreciate your time
and help.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><o:p> </o:p></span></p>
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif";color:#215868'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal style='margin-left:1.0in'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Eric Celeste [mailto:efc.dev@gmail.com] <br>
<b>Sent:</b> Tuesday, December 04, 2007 4:00 PM<br>
<b>To:</b> Sameer Kumar<br>
<b>Cc:</b> pmwiki-users@pmichaud.com<br>
<b>Subject:</b> Re: [pmwiki-users] Clean URLs (Another question from the
newbie)<o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
<p class=MsoNormal style='margin-left:1.0in'>I've only used Apache in a Unix
environment, so I have no idea what issues might be stirred up by this being a
Windows environment.<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>> Interestingly, all the
URLs when clicking Pmwiki internal links have the "?n=" in
them. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>> However, if one types an
address without that, the wiki is able to resolve it.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>The "?n=" being there or
not in the links should be controlled by the $EnablePathInfo variable in the
config.php file. Interestingly, the comments about this in the config file
state: "try setting $EnablePathInfo below. Note that this
doesn't work in all environments, it depends on your webserver and PHP
configuration." Maybe there is something else in the machine or PHP
environment that is preventing EnablePathInfo from doing it's job. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>As to why the link to <a
href="http://hip.eharch.com/Main/Main">http://hip.eharch.com/Main/Main</a> does
not work, I am a bit more mystified. For one thing, I don't know what you mean
by it works if typed into directly. Typing a URL or clicking on it should make
no difference to how it is resolved, if it does make a difference, then I'm out
of my depth. When I try to go to that URL I get... <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'> The requested
URL /wiki/pmwiki.phpMain/Main was not found on this server.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>Notice the missing "/"
between "php" and the first "Main". The only thing I can
think of is that your EnablePathInfo is actually not set to "1".
Check to make sure the "#" is removed at the front of that line in
your config.php file.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>Good luck,<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'>...Eric<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-left:1.0in'><o:p> </o:p></p>
<div>
<p class=MsoNormal style='margin-left:1.0in'><span class=gmailquote>On 12/4/07,
<b>Sameer Kumar</b> <<a href="mailto:skumar@eharch.com"> skumar@eharch.com</a>>
wrote:</span><o:p></o:p></p>
<div>
<div>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>Eric,</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>I
have pmwiki installed with Apache running on a Windows XP machine.</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>My
web root directory is C:\web</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>The
full path of the pmwiki install is C:\web\wiki\pmwiki.php</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>The
URL that I would like to be home is <a href="http://hip.eharch.com"
target="_blank">http://hip.eharch.com</a> and this works. </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>Actually,
my homepage is located at <a href="http://hip.eharch.com/Main/Main"
target="_blank">http://hip.eharch.com/Main/Main </a>which also works if
directly typed into the browser URL bar.</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'> </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>My
.htaccess file is located inside C:\web and its contents are as follows:</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'> </span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'># Use
mod_rewrite to enable "Clean URLs" for a PmWiki installation.</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>RewriteEngine
On</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>#
Define the rewrite base. It's not necessarily PmWiki's directory.</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>RewriteBase
/</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>#
Send requests without parameters to pmwiki.php.</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>RewriteRule
^$
/wiki/pmwiki.php [L]</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>#
Send requests for index.php to pmwiki.php.</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>RewriteRule
^index\.php$ /wiki/pmwiki.php [L]</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>#
Send requests to pmwiki.php, appending the query string part.</span><o:p></o:p></p>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'>RewriteRule
^([A-Z0-9\xa0-\xff].*)$ /wiki/pmwiki.php?n=$1 [QSA,L]</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'> </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>Interestingly,
all the URLs when clicking Pmwiki internal links have the "?n=" in
them. However, if one types an address without that, the wiki is able to
resolve it. </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>For
example, if you click "Projects" on the sidebar, it goes to </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'><a
href="http://hip.eharch.com/?n=Projects/Projects" target="_blank">http://hip.eharch.com/?n=Projects/Projects</a></span>
<o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>but
if you manually type </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'><a
href="http://hip.eharch.com/Projects/Projects" target="_blank">http://hip.eharch.com/Projects/Projects</a>
</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>it
still works.</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'> </span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>Thanks
for your attention.</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'>Sameer</span><o:p></o:p></p>
<p style='margin-left:1.0in'><span style='font-size:10.0pt;color:#215868'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p style='margin-left:1.5in'><b><span style='font-size:10.0pt'>From:</span></b><span
style='font-size:10.0pt'> Eric Celeste [mailto:<a
href="mailto:efc.dev@gmail.com" target="_blank"> efc.dev@gmail.com</a>] <br>
<b>Sent:</b> Tuesday, December 04, 2007 2:16 PM<br>
<b>To:</b> Sameer Kumar<br>
<b>Cc:</b> <a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<b>Subject:</b> Re: [pmwiki-users] Clean URLs (Another question from the
newbie)</span><o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
<p style='margin-left:1.5in'>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). <o:p></o:p></p>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>Really, to debug this would require more detailed
information using only full paths.<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>What is the full path of your pmwiki install? <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>(for example "/home/efc/www/pmwiki/pmwiki.php")<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>What is the URL you would like to be
"home" for your wiki?<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>(for example " <a
href="http://mydomain.org/Main/HomePage" target="_blank">http://mydomain.org/Main/HomePage</a>")<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>What is the full path of your
".htaccess" file?<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>(for example "/home/efc/www/.htaccess") <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>Assumption: your server is configured so that a
request of a page from your domain actually reaches your .htaccess file.<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'>...Eric<o:p></o:p></p>
</div>
<div>
<p style='margin-left:1.5in'> <o:p></o:p></p>
<div>
<p style='margin-left:1.5in'>On 12/4/07, <b>Sameer Kumar</b> <<a
href="mailto:skumar@eharch.com" target="_blank">skumar@eharch.com</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p style='margin-left:1.5in'><span style='font-size:10.0pt;color:#215868'> </span><o:p></o:p></p>
<div>
<div>
<p style='margin-left:2.0in'><span style='color:#215868'><Snip></span><br>
Following the directions in the clean URL cookbook I set up my .htaccess<br>
file in /website as follows:<br>
<br>
# Use mod_rewrite to enable "Clean URLs" for a PmWiki installation.<br>
RewriteEngine On <br>
# The rewrite base will be the document root.<br>
RewriteBase /website<br>
# Send requests without parameters to pmwiki.php.<br>
RewriteRule ^$
/singles/pmwiki.php [L]<br>
# Send requests for index.php to pmwiki.php .<br>
RewriteRule ^index\.php$ /singles/pmwiki.php [L]<br>
# Don't rewrite requests for any files, directories, or symbolic<br>
# links (shortcuts) that exist on the filesystem.<br>
# RewriteCond %{REQUEST_FILENAME} !-f<br>
# RewriteCond %{REQUEST_FILENAME} !-d<br>
# RewriteCond %{REQUEST_FILENAME} !-l # Send requests to pmwiki.php,<br>
appending the query string part.<br>
RewriteRule ^([A-Z0-9\xa0-\xff].*)$ /singles/pmwiki.php?n=$1 [QSA,L]<br>
<br>
I set up my /website/singles/local/config.php file as follows:<br>
<br>
<?php if (!defined('PmWiki')) exit();<br>
## Use "Clean URLs".<br>
$EnablePathInfo = 1;<br>
$ScriptUrl = "<a href="http://localhost" target="_blank"> http://localhost</a>";<br>
## more configuration settings...<br>
<br>
<span style='color:#215868'><snip></span><o:p></o:p></p>
<p style='margin-left:2.5in'>I believe you want the RewriteBase to be the root
as served rather than the root as stored. Try "RewriteBase /"
instead.<o:p></o:p></p>
<p style='margin-left:2.5in'>Note, the should also allow "<a
href="http://localhost" target="_blank"> http://localhost</a>" without the
"index.php" to bring up your site.<o:p></o:p></p>
<p style='margin-left:2.5in'>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. <o:p></o:p></p>
<p style='mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;
margin-left:2.5in'>...Eric<o:p></o:p></p>
<p style='mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;
margin-left:2.0in'><snip><o:p></o:p></p>
<p style='mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;
margin-left:1.5in'>Eric,<o:p></o:p></p>
<p style='margin-left:1.5in'>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.<o:p></o:p></p>
<p style='margin-left:1.5in'>However, I cannot get rid of a "?n="
from my URLs. For example, my URLs read as:<o:p></o:p></p>
<p style='margin-left:1.5in'><a
href="http://hip.eharch.com/?n=Materials/Materials" target="_blank">http://hip.eharch.com/?n=Materials/Materials</a><o:p></o:p></p>
<p style='margin-left:1.5in'>instead of <o:p></o:p></p>
<p style='margin-left:1.5in'><a href="http://hip.eharch.com/Materials/Materials"
target="_blank">http://hip.eharch.com/Materials/Materials</a><o:p></o:p></p>
<p style='margin-left:1.5in'>which I would prefer.<o:p></o:p></p>
<p style='margin-left:1.5in'>Would you have any ideas or suggestions regarding
getting rid of the "?n=" ?<o:p></o:p></p>
<p style='margin-left:1.5in'>Thanks. Sameer<o:p></o:p></p>
<p style='margin-left:2.0in'> <o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p style='margin-left:1.5in'><br>
<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class=MsoNormal style='margin-left:1.0in'><br>
<o:p></o:p></p>
</div>
</div>
</body>
</html>