[plug] Apache Rewrite Rule
Leon Wright
techman83 at gmail.com
Mon Dec 17 12:59:34 WST 2012
Hi Guys,
Been playing with Perl's Dancer web framework, it's rather nifty! I have
hit a stumbling block with my Apache rewrite rule knowledge.
There is something wrong with this as it doesn't appear to rewrite
http://host/water/foo
to
http://host/water/dispatch.cgi/foo
Alias /water /usr/local/leon/DanceApp/public
<Directory "/usr/local/leon/DanceApp/public">
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
AllowOverride None
AddHandler cgi-script .cgi
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/water/(.*)$ dispatch.cgi/$1 [QSA,L]
ErrorLog /var/log/apache2/water-error.log
CustomLog /var/log/apache2/water-access_log common
This works:
http://10.2.0.66/water/dispatch.cgi/foo
But this doesn't:
http://10.2.0.66/water/foo
Which if my rewrite rule was correct should.
Any apache experts out there? The regex looks correct to me and I have
tried a few other variations.
Leon
--
DRM 'manages access' in the same way that jail 'manages freedom.'
# cat /dev/mem | strings | grep -i cats
Damn, my RAM is full of cats... MEOW!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20121217/23a528a7/attachment.html>
More information about the plug
mailing list