Skip to content

The app breaks 404 when switching colors #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MoElaSec opened this issue Jan 9, 2022 · 3 comments
Closed

The app breaks 404 when switching colors #24

MoElaSec opened this issue Jan 9, 2022 · 3 comments

Comments

@MoElaSec
Copy link

MoElaSec commented Jan 9, 2022

When deployed to Netlify try to navigate to any subpage and change the viewing mode Dark/Light and notice how the page breaks ...

@realstoman
Copy link
Owner

Seems like that's an issue with the Netlify itself.
BTW, I have started a fix for this and will be using a different method for switching colors. It should not reload the page.

@abd-abdullah
Copy link
Contributor

This project is using createWebHistory mode in vue router which is recommended by vue router. This issue will raise when you will reload any page rather than the home page.
To fix this issue you have to configure your server. Please check the link below https://router.vuejs.org/guide/essentials/history-mode.html

In your .htaccess add the following to fix that issue.

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.html [L]
</IfModule>

@realstoman
Copy link
Owner

Thank you @abd-abdullah for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants