Homepage 404 on Cloudways Server, .htaccess problem?

Hello everyone!

I’ve deployed my site to Cloudways for some testing. On the live server, the homepage returns a 404 on load. If you visit any other blog or page and refresh the state then revisit the homepage, it displays properly. That is the only way to view the homepage. The error within console is the following:
GET https://enzosgreatadventure.com/ [HTTP/2 404 Not Found 1941ms]

Could this be a problem with the .htaccess file I created to get this app working? This is what is within the file currently:

RewriteEngine On
RewriteBase /
RewriteRule ^(.*)?$$1 [P,L]

Extra things:
Github repo: GitHub - Marcquito/enzosgreatadventure
URL: https://enzosgreatadventure.com

Thanks again for any help!

Frontity doesn’t use .htaccess files, so it’s useless anyway.
And if you placed it at your WordPress setup, it will simply prevent people from accessing it because you so a rewrite for the client sending them to their own computer.

So how does your current setup look like and what do you want to happen?

PS. I assume you contacted Cloudways support to update NPM and NodeJS, otherwise Frontity won’t work. Although if you want WP and Frontity on the same server they’ll have to do a lot more to make it work properly.

Thanks for the reply. This is the result of a lot of back-and-forth with Cloudways. Since Frontity defaults at port 3000 they recommended this in place to redirect through traffic. After your reply here, a better solution was to run this app on port 3002 and remove the .htaccess all together. Thanks for the help there.

With that said though, the homepage still delivers a 404 error. Same problem, same “solution” with refreshing a different page and revisiting the homepage afterward. I turned off all caching on the server (varnish) to make sure that wasn’t the culprit.

**Edit: You mentioned the server housing both the WordPress install and the Frontity app could be troublesome. I never considered that. Do you think this could be causing the 404 homepage issue? Other than that it seems to work…

Just updating here with my “solution”…

So for literally weeks, possibly over a month, I have spent time trying to get Cloudways to work for me when it comes to hosting Frontity applications. After so much time working with it, discussing with support, getting it to only half-way work… I decided it was best to abandon this since clearly the hosting provider is just not where it needs to be for these types of apps.

I decided to take the advice of the documentation and try out Vercel. I immediately became upset with myself on how easy it was to deploy… I just couldn’t believe it. This was definitely the way to go. Not only was it easy, it tightly integrates with my repos and it’s just an absolute pleasure to use. I’m extremely happy with this route!

I’ll continue to use Cloudways for hosting other old school WordPress installs and other PHP based applications since that’s what I find it good for.