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