Skip to main content
adicionou 297 caracteres ao conteúdo
Fonte Link
thxmxx
  • 550
  • 2
  • 6

Mude(ou crie) o arquivo .htaccess, na raiz do site.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) /index.html [NC,L]

Edit:

Se quiser usar o nginx é mais simples

Só editar o arquivo /etc/nginx/sites-enabled/default

server {
    ...
    root /caminho/do/site;
    ...
    location / {
                    try_files $uri $uri/ /index.html;
            }
    }

Mude(ou crie) o arquivo .htaccess, na raiz do site.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) /index.html [NC,L]

Mude(ou crie) o arquivo .htaccess, na raiz do site.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) /index.html [NC,L]

Edit:

Se quiser usar o nginx é mais simples

Só editar o arquivo /etc/nginx/sites-enabled/default

server {
    ...
    root /caminho/do/site;
    ...
    location / {
                    try_files $uri $uri/ /index.html;
            }
    }
Fonte Link
thxmxx
  • 550
  • 2
  • 6

Mude(ou crie) o arquivo .htaccess, na raiz do site.

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]

RewriteRule ^(.*) /index.html [NC,L]