fix url rewrite - redirect frontend urls to react router #3

Merged
bilal.catic merged 1 commits from fix-url-rewrite into development 2018-06-22 14:48:23 +02:00
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/