You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should force a redirect to HTTPS (because of ServiceWorker, which needs HTTPS), and it should route all domain.com/whatever sub pages to the index.html to let react-router take care of them. FIrst implementation:
<ifModule mod_rewrite.c>
# Make apache follow sym links to filesOptions +FollowSymLinks
# If somebody opens a folder, hide all files from the resulting folder listIndexIgnore */*
# Enable rewritingRewriteEngine On
# If its not HTTPS# RewriteCond %{HTTPS} off# Comment out the line above, and uncomment the line below if you're using CloudFlare/... for SSLRewriteCond%{HTTP:X-Forwarded-Proto}!https# Redirect to the same URL with https://, ignoring all further rules if this one matchedRewriteRule^(.*)https://%{HTTP_HOST}/$1[R,L]# If we get to here, it means we are on https:// already# If the file with the specified name in the browser doesn't existRewriteCond%{REQUEST_FILENAME}!-f# and the directory with the specified name in the browser doesn't existRewriteCond%{REQUEST_FILENAME}!-d# and we are not opening index.html (otherwise we get a redirect loop)RewriteCond%{REQUEST_FILENAME}!\/$# Rewrite all subdomains to the root index.htmlRewriteRule^(.*)/
</ifModule>
The text was updated successfully, but these errors were encountered:
<ifModule mod_rewrite.c>
######################################################################## GENERAL ######################################################################### Make apache follow sym links to filesOptions +FollowSymLinks
# If somebody opens a folder, hide all files from the resulting folder listIndexIgnore */*
######################################################################## REWRITING ######################################################################### Enable rewritingRewriteEngine On
# If its not HTTPSRewriteCond%{HTTPS}off# Comment out the RewriteCond above, and uncomment the RewriteCond below if you're using a load balancer (e.g. CloudFlare) for SSL# RewriteCond %{HTTP:X-Forwarded-Proto} !https# Redirect to the same URL with https://, ignoring all further rules if this one is in effectRewriteRule^(.*)https://%{HTTP_HOST}/$1[R,L]# If we get to here, it means we are on https://# If the file with the specified name in the browser doesn't existRewriteCond%{REQUEST_FILENAME}!-f# and the directory with the specified name in the browser doesn't existRewriteCond%{REQUEST_FILENAME}!-d# and we are not opening the root already (otherwise we get a redirect loop)RewriteCond%{REQUEST_FILENAME}!\/$# Rewrite all requests to the rootRewriteRule^(.*)/
</ifModule>
It should force a redirect to HTTPS (because of ServiceWorker, which needs HTTPS), and it should route all
domain.com/whatever
sub pages to theindex.html
to letreact-router
take care of them. FIrst implementation:The text was updated successfully, but these errors were encountered: