[Dancer-users] rewrite rule and proxy pass

Mr. Puneet Kishor punk.kish at gmail.com
Wed Mar 7 16:50:33 CET 2012


I have the following in my Apache conf

    <Directory "/path/to/foo">
       Options FollowSymLinks
       Order allow,deny
       Allow from all
       AllowOverride None

       AddHandler php5-script .php
       AddType application/x-httpd-php .php
       AddType application/x-httpd-php-source .phps

       RewriteEngine On
       RewriteRule ^([^.?]+).json$ $1.php [L]
    </Directory>
    
    <Proxy *>
        Options FollowSymLinks MultiViews
        Order allow,deny
        Allow from all
        AllowOverride All
    </Proxy>
    
    ProxyPass        /foo !
    ProxyPass        / http://127.0.0.1:5012/
    ProxyPassReverse / http://127.0.0.1:5012/
    
Dancer is being served via Starman on port 5012. When I go to http://mywebserver.edu/foo/index.php, I get the right response. However, when I go to http://mywebserver.edu/foo/index.json, Dancer tells me it is the void. Is my rewrite rule not correct?  If I turn off ProxyPass (effectively shutting access to Dancer), the rewrite rule seems to work just fine.

Suggestions?


--
Puneet Kishor


More information about the Dancer-users mailing list