gremo
gremo

Reputation: 48899

Apache redirect loop with mod_alias (mod_rewrite not available)

Is there any way to forward all requests to app.phar/$1 when mod_rewrite is not available for apache? The following is causing a redirect loop:

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        RedirectMatch 302 ^/(.*)$ /app.phar/$1
    </IfModule>
</IfModule>

Upvotes: 0

Views: 65

Answers (1)

Mike Rock&#233;tt
Mike Rock&#233;tt

Reputation: 9007

It would cause a loop because (.*) catches /app.phar/..., and will therefore redirect again.

You should still have mod_dir available, and so you can try with the following instead:

FallbackResource /app.phar

For more about this directive, please view the current documentation.

Upvotes: 1

Related Questions