I&#39;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.<div><br class="webkit-block-placeholder"></div><div>&gt;&nbsp;Interestingly, all the URLs when clicking Pmwiki internal links have the "?n=" in them.&nbsp;
</div><div>&gt; However, if one types an address without that, the wiki is able to resolve it.</div><div><br class="webkit-block-placeholder"></div><div>The &quot;?n=&quot; 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: &quot;try setting&nbsp;$EnablePathInfo below. &nbsp;Note that this doesn&#39;t work in all environments,&nbsp;it depends on your webserver and PHP configuration.&quot; Maybe there is something else in the machine or PHP environment that is preventing&nbsp;EnablePathInfo from doing it&#39;s job.
</div><div><br class="webkit-block-placeholder"></div><div>As to why the link to&nbsp;<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&#39;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&#39;m out of my depth. When I try to go to that URL I get...
</div><div><br class="webkit-block-placeholder"></div><div>&nbsp;&nbsp;&nbsp;The requested URL /wiki/pmwiki.phpMain/Main was not found on this server.</div><div><br class="webkit-block-placeholder"></div><div>Notice the missing &quot;/&quot; between &quot;php&quot; and the first &quot;Main&quot;. The only thing I can think of is that your&nbsp;EnablePathInfo is actually not set to &quot;1&quot;. Check to make sure the &quot;#&quot; is removed at the front of that line in your 
config.php file.</div><div><br class="webkit-block-placeholder"></div><div>Good luck,</div><div>...Eric</div><div><br><div><span class="gmail_quote">On 12/4/07, <b class="gmail_sendername">Sameer Kumar</b> &lt;<a href="mailto:skumar@eharch.com">
skumar@eharch.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">








<div lang="EN-US" link="blue" vlink="purple">

<div>

<p><span style="font-size:10.0pt;color:#215868">Eric,</span></p>

<p><span style="font-size:10.0pt;color:#215868">I have pmwiki installed with Apache running on a Windows XP
machine.</span></p>

<p><span style="font-size:10.0pt;color:#215868">My web root directory is C:\web</span></p>

<p><span style="font-size:10.0pt;color:#215868">The full path of the pmwiki install is C:\web\wiki\pmwiki.php</span></p>

<p><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" onclick="return top.js.OpenExtLink(window,event,this)">http://hip.eharch.com</a> and this works.
</span></p>

<p><span style="font-size:10.0pt;color:#215868">Actually, my homepage is located at <a href="http://hip.eharch.com/Main/Main" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://hip.eharch.com/Main/Main
</a>
which also works if directly typed into the browser URL bar.</span></p>

<p><span style="font-size:10.0pt;color:#215868">&nbsp;</span></p>

<p><span style="font-size:10.0pt;color:#215868">My .htaccess file is located inside C:\web and its contents are
as follows:</span></p><span class="q">

<p><span style="font-size:10.0pt;color:#215868">&nbsp;</span></p>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868"># Use mod_rewrite to enable
&quot;Clean URLs&quot; for a PmWiki installation.</span></p>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868">RewriteEngine On</span></p></span>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868"># Define the rewrite
base.&nbsp; It&#39;s not necessarily PmWiki&#39;s directory.</span></p>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868">RewriteBase /</span></p><span class="q">

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868"># Send requests without
parameters to pmwiki.php.</span></p></span>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868">RewriteRule
^$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/wiki/pmwiki.php&nbsp; [L]</span></p><span class="q">

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868"># Send requests for index.php
to pmwiki.php.</span></p></span>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868">RewriteRule ^index\.php$
/wiki/pmwiki.php&nbsp; [L]</span></p><span class="q">

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868"># Send requests to pmwiki.php,
appending the query string part.</span></p></span>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868">RewriteRule
^([A-Z0-9\xa0-\xff].*)$ /wiki/pmwiki.php?n=$1&nbsp; [QSA,L]</span></p>

<p><span style="font-size:10.0pt;color:#215868">&nbsp;</span></p>

<p><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></p>

<p><span style="font-size:10.0pt;color:#215868">For example, if you click "Projects" on the sidebar,
it goes to </span></p>

<p><span style="font-size:10.0pt;color:#215868"><a href="http://hip.eharch.com/?n=Projects/Projects" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://hip.eharch.com/?n=Projects/Projects</a></span>
</p>

<p><span style="font-size:10.0pt;color:#215868">but if you manually type </span></p>

<p><span style="font-size:10.0pt;color:#215868"><a href="http://hip.eharch.com/Projects/Projects" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://hip.eharch.com/Projects/Projects</a>
</span></p>

<p><span style="font-size:10.0pt;color:#215868">it still works.</span></p>

<p><span style="font-size:10.0pt;color:#215868">&nbsp;</span></p>

<p><span style="font-size:10.0pt;color:#215868">Thanks for your attention.</span></p>

<p><span style="font-size:10.0pt;color:#215868">Sameer</span></p>

<p><span style="font-size:10.0pt;color:#215868">&nbsp;</span></p>

<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">

<p style="margin-left:.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" onclick="return top.js.OpenExtLink(window,event,this)">
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" onclick="return top.js.OpenExtLink(window,event,this)">pmwiki-users@pmichaud.com</a><br>
<b>Subject:</b> Re: [pmwiki-users] Clean URLs (Another question from the
newbie)</span></p>

</div><div><span class="e" id="q_116a6b2d8ded421a_9">

<p style="margin-left:.5in">&nbsp;</p>

<p style="margin-left:.5in">The only other problem I see is
potentially the leading &quot;/&quot; on the rewritten address. In other words,
all the &quot;/singles&quot; below should probably be &quot;singles&quot;
instead (assuming &quot;singles&quot; is not actually at the root of your hard
disk). </p>

<div>

<p style="margin-left:.5in">&nbsp;</p>

</div>

<div>

<p style="margin-left:.5in">Really, to debug this would require
more detailed information using only full paths.</p>

</div>

<div>

<p style="margin-left:.5in">&nbsp;</p>

</div>

<div>

<p style="margin-left:.5in">What is the full path of your
pmwiki install? </p>

</div>

<div>

<p style="margin-left:.5in">(for example
&quot;/home/efc/www/pmwiki/pmwiki.php&quot;)</p>

</div>

<div>

<p style="margin-left:.5in">&nbsp;</p>

</div>

<div>

<p style="margin-left:.5in">What is the URL you would like to
be &quot;home&quot; for your wiki?</p>

</div>

<div>

<p style="margin-left:.5in">(for example &quot; <a href="http://mydomain.org/Main/HomePage" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://mydomain.org/Main/HomePage</a>&quot;)</p>

</div>

<div>

<p style="margin-left:.5in">&nbsp;</p>

</div>

<div>

<p style="margin-left:.5in">What is the full path of your
&quot;.htaccess&quot; file?</p>

</div>

<div>

<p style="margin-left:.5in">(for example
&quot;/home/efc/www/.htaccess&quot;) </p>

</div>

<div>

<p style="margin-left:.5in">&nbsp;</p>

</div>

<div>

<p style="margin-left:.5in">Assumption: your server is
configured so that a request of a page from your domain actually reaches your
.htaccess file.</p>

</div>

<div>

<p style="margin-left:.5in">&nbsp;</p>

</div>

<div>

<p style="margin-left:.5in">...Eric</p>

</div>

<div>

<p style="margin-left:.5in">&nbsp;</p>

<div>

<p style="margin-left:.5in"><span>On 12/4/07, <b>Sameer
Kumar</b> &lt;<a href="mailto:skumar@eharch.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">skumar@eharch.com</a>&gt;
wrote:</span></p>

<div>

<div>

<p style="margin-left:.5in"><span style="font-size:10.0pt;color:#215868">&nbsp;</span></p>

<div>

<div>

<p style="margin-left:1.0in"><span style="color:#215868">&lt;Snip&gt;</span><br>
<span>Following the directions in the clean URL cookbook I set up my
.htaccess</span><br>
<span>file in /website as follows:</span><br>
<br>
<span># Use mod_rewrite to enable &quot;Clean URLs&quot; for a PmWiki
installation.</span><br>
<span>RewriteEngine On </span><br>
<span># The rewrite base will be the document root.</span><br>
<span>RewriteBase /website</span><br>
<span># Send requests without parameters to pmwiki.php.</span><br>
<span>RewriteRule
^$&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/singles/pmwiki.php&nbsp;&nbsp;[L]</span><br>
<span># Send requests for index.php to pmwiki.php .</span><br>
<span>RewriteRule ^index\.php$ /singles/pmwiki.php&nbsp;&nbsp;[L]</span><br>
<span># Don&#39;t rewrite requests for any files, directories, or symbolic</span><br>
<span># links (shortcuts) that exist on the filesystem.</span><br>
<span># RewriteCond %{REQUEST_FILENAME} !-f</span><br>
<span># RewriteCond %{REQUEST_FILENAME} !-d</span><br>
<span># RewriteCond %{REQUEST_FILENAME} !-l # Send requests to
pmwiki.php,</span><br>
<span>appending the query string part.</span><br>
<span>RewriteRule ^([A-Z0-9\xa0-\xff].*)$
/singles/pmwiki.php?n=$1&nbsp;&nbsp;[QSA,L]</span><br>
<br>
<span>I set up my /website/singles/local/config.php file as follows:</span><br>
<br>
<span>&lt;?php if (!defined(&#39;PmWiki&#39;)) exit();</span><br>
<span>## Use &quot;Clean URLs&quot;.</span><br>
<span>$EnablePathInfo = 1;</span><br>
<span>$ScriptUrl = &quot;<a href="http://localhost" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://localhost</a>&quot;;</span><br>
<span>## more configuration settings...</span><br>
<br>
<span style="color:#215868">&lt;snip&gt;</span></p>

<p style="margin-left:1.5in">I believe you want the RewriteBase to be the root
as served rather than the root as stored. Try &quot;RewriteBase /&quot;
instead.</p>

<p style="margin-left:1.5in">Note, the should also allow &quot;<a href="http://localhost" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://localhost</a>&quot; without the
&quot;index.php&quot; to bring up your site.</p>

<p style="margin-left:1.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. </p>

<p style="margin-right:0in;margin-bottom:12.0pt;margin-left:1.5in">...Eric</p>

<p style="margin-right:0in;margin-bottom:12.0pt;margin-left:1.0in">&lt;snip&gt;</p>

<p style="margin-right:0in;margin-bottom:12.0pt;margin-left:.5in">Eric,</p>

<p style="margin-left:.5in">I have exactly the same situation as Tom&#39;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.</p>

<p style="margin-left:.5in">However, I cannot get rid of a &quot;?n=&quot; from
my URLs. For example, my URLs read as:</p>

<p style="margin-left:.5in"><a href="http://hip.eharch.com/?n=Materials/Materials" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://hip.eharch.com/?n=Materials/Materials</a></p>

<p style="margin-left:.5in">instead of </p>

<p style="margin-left:.5in"><a href="http://hip.eharch.com/Materials/Materials" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://hip.eharch.com/Materials/Materials</a></p>

<p style="margin-left:.5in">which I would prefer.</p>

<p style="margin-left:.5in">Would you have any ideas or suggestions regarding
getting rid of the &quot;?n=&quot; ?</p>

<p style="margin-left:.5in">Thanks. Sameer</p>

<p style="margin-left:1.0in">&nbsp;</p>

</div>

</div>

</div>

</div>

</div>

<p style="margin-left:.5in"><br>
&nbsp;</p>

</div>

</span></div></div>

</div>


</blockquote></div><br>&nbsp;</div>