This is my first Next.js application, and I’m encountering an error. During development, whenever I tried to check the responsiveness using the browser, I consistently faced an Internet Error upon pressing CTRL+R to reload the page. Initially, I thought it was an issue with my localhost, so I tried hosting my project on Hostinger, but I encountered the same problem. The website loads well initially, but when I navigate to certain pages, they don’t load, and when I refresh the page, I get an internet error.
This is my next.config.mjs :
/** @type {import('next').NextConfig} */
const nextConfig = {
// output: 'export',
images: {
domains: ['trophe.net', 'localhost'],
unoptimized: true
},
trailingSlash: true,
};
export default nextConfig;
The .htaccess :
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
My hosted website is : https://trophe.net/
Try to access /team and reload the page to reproduce the error.
I checked the documentation and found nothing about this type of error. I tried to recreate the project.