Does passenger not work with Rewrite rules in an .htaccess file?

1.3k Views Asked by At

I have a rewrite rule that only works when in a virtualhost context.

PassengerEnabled on
RewriteEngine on
RewriteRule ^/release-.+/(images|javascripts|stylesheets|system|assets)/(.*)$ /$1/$2 [L]

If I set PassengerEnabled off in the .htaccess file, the rewrite rules work fine, otherwise they only work in the <VirtualHost> site config.

Is there a way to have rewrite rules be used in the .htaccess file with passenger?

1

There are 1 best solutions below

1
On

Passenger should be compatible with mod_rewrite by default as long as PassengerHighPerformance is off.

If you're using an older version of Phusion Passenger you might want to make sure RailsAllowModRewrite is set correctly.