My current project involves utilizing Nuxt.js in Single Page Application (SPA) mode. However, I am encountering difficulties when trying to deploy it on my Apache server. Has anyone else faced this issue before?
I suspect that the problem may be related to trailing slashes in the URL. I attempted to address this by setting DirectorySlash Off in my .htaccess file, but unfortunately, that did not resolve the issue. I also tried
No luck with the following either:
DirectorySlash Off
#eliminating trailing slash
RewriteCond %{THE_REQUEST_FILENAME} /(.*)/( |$|?)
RewriteRule ^(.*)/$ $1 [R=301,L]
# adding the slash back internally
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.*)$ /$1/ [L]
The current location of my project is . If you click the button (in the section featuring the man on the boat background), you will navigate to and everything seems to function properly. However, upon refreshing the page, some images are missing (such as those in the header).
Interestingly, everything works smoothly on my local Node.js server.