Hi Guys,<div><br></div><div>Been playing with Perl's Dancer web framework, it's rather nifty! I have hit a stumbling block with my Apache rewrite rule knowledge.</div><div><br></div><div>There is something wrong with this as it doesn't appear to rewrite</div>
<div><br></div><div><a href="http://host/water/foo">http://host/water/foo</a></div><div><br></div><div>to</div><div><br></div><div><a href="http://host/water/dispatch.cgi/foo">http://host/water/dispatch.cgi/foo</a></div><div>
<br></div><div><div style="font-family:arial,sans-serif;font-size:13px">Alias /water /usr/local/leon/DanceApp/public</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
<Directory "/usr/local/leon/DanceApp/public"></div><div style="font-family:arial,sans-serif;font-size:13px">   Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch</div><div style="font-family:arial,sans-serif;font-size:13px">
   Order allow,deny</div><div style="font-family:arial,sans-serif;font-size:13px">   Allow from all</div><div style="font-family:arial,sans-serif;font-size:13px">   AllowOverride None</div><div style="font-family:arial,sans-serif;font-size:13px">
   AddHandler cgi-script .cgi</div><div style="font-family:arial,sans-serif;font-size:13px"></Directory></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
RewriteEngine On</div><div style="font-family:arial,sans-serif;font-size:13px">RewriteCond %{REQUEST_FILENAME} !-f</div><div style="font-family:arial,sans-serif;font-size:13px">RewriteRule ^/water/(.*)$ dispatch.cgi/$1 [QSA,L]</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">ErrorLog  /var/log/apache2/water-error.log</div><div style="font-family:arial,sans-serif;font-size:13px">
CustomLog /var/log/apache2/water-access_log common</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">This works:<br><a href="http://10.2.0.66/water/dispatch.cgi/foo">http://10.2.0.66/water/dispatch.cgi/foo</a></div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">But this doesn't:</div><div style="font-family:arial,sans-serif;font-size:13px"><a href="http://10.2.0.66/water/foo">http://10.2.0.66/water/foo</a><br>
</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Which if my rewrite rule was correct should.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Any apache experts out there? The regex looks correct to me and I have tried a few other variations.</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">Leon</div><div>--<br>DRM 'manages access' in the same way that jail 'manages freedom.'<br><br># cat /dev/mem | strings | grep -i cats<br>Damn, my RAM is full of cats... MEOW!!</div>
<br>
</div>