I have a rewrite rule in my .htaccess like so: RewriteRule ^ /var/www/index.html [L]
(for an angular app's view routing)
However, when I go to /anything I get 404. Any idea why this would be? Base docker container is eboraas/apache.
My dockerfile:
FROM eboraas/apache
RUN a2enmod rewrite
ADD . /var/www
EXPOSE 80
Edit: also tried rule ^.*$
with no luck. it appears to be that .htaccess is not being used/is being ignored, not that the rule is wrongly configured.
In my case AllowOverride All
was already in place for the whole /var/www
directory, I just only had to add this into Dockerfile
:
# enabling mod_rewrite
RUN cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With