Code Solution

thi is me th syir wb site rith now thodign

home

next js deploy after refresh page not found react

Whenever we host our Next JS project on an online server, we get to see an error that whenever we reload or refresh our Next JS project, we get the error of page not found. Such errors are seen in the projects of Next JS or React JS which today we know is the error of page not found. react js or next js is a single page application which gives this error in which there is only one page or our entire application is made up of many components.

how to sovle page not found next js 14 and react js

To remove this error in Next js and React js, we need to do a little configuration in our host provider. We will have to do this so that our error can be corrected.

router.refresh not working nextjs

  • First of all you will have to open the search panel and after that you will have to go to the domain on which you have kept your website and then inside that you will have to find the hidden file in your settings.
  • hidden file name = .htaccess

  • You have to find this file and add another new code which will help you in this error and then you will have to send this file to another new file of your file same .htaccess. You can create a name with this and paste your code inside it.
  • how to add .htaccess code in file

      
         
        
    <IfModule mod_rewrite.c>
    
    RewriteEngine on 
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^(.*)$ $1.html [NC,L]
      
    </IfModule>