Answer the question
In order to leave comments, you need to log in
How to do a 404 redirect to SPA?
Guys, how can I make SPA redirect to /#/404 except for the main one if there is no backend?
Here's what's there:
ErrorDocument 404 /#/404
# Манипуляции над URL
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Перенаправляем на https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
# Переадресация с index.html на /
RewriteRule ^index\.html$ / [R=301,L]
# Удаляем www из url
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question