fix url rewrite - redirect frontend urls to react router

This commit is contained in:
GotPPay
2018-06-22 12:36:02 +02:00
parent f0dadd549f
commit 0acc0da6ec
2 changed files with 15 additions and 1 deletions

12
docker/php/.htaccess Normal file
View File

@@ -0,0 +1,12 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]
</IfModule>

View File

@@ -28,4 +28,6 @@ RUN cp -r api-wiaas /var/www/html/
WORKDIR /home/wiaas/client-wiaas
RUN npm rebuild node-sass --force
RUN npm install && npm run build
RUN cp -r build/* /var/www/html/
RUN cp -r build/* /var/www/html/
COPY docker/php/.htaccess /var/www/html/