fix url rewrite - redirect frontend urls to react router
This commit is contained in:
12
docker/php/.htaccess
Normal file
12
docker/php/.htaccess
Normal 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>
|
||||||
@@ -29,3 +29,5 @@ WORKDIR /home/wiaas/client-wiaas
|
|||||||
RUN npm rebuild node-sass --force
|
RUN npm rebuild node-sass --force
|
||||||
RUN npm install && npm run build
|
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/
|
||||||
Reference in New Issue
Block a user