I’m moving a domain from an old server to one with Hestia on it and I’m running into a problem with the .htaccess that is needed for the site to operate. I want to rewrite everything to index.php which will deal with the request. This is the .htaccess that works on the existing server:
However, I’m getting a 404 on everything other thank index.php with the new Hestia based server. .htaccess just doesn’t appear to be doing anything / not being used.
Is there something I need to do to add support for the .htaccess files and more specificaly the RewriteRule command?
I did see this thread and tried that, but wasn’t able to see any difference.
Save files, restart or reload nginx and check again. If it works as expected, you should create a new nginx proxy template, made the changes in that template and assign it to your web domain so the changes won’t be overriden in a future update.
Many thanks for your reply. I should have thought of looking into that. I’ve just been digging around and it looks like the way Hestia is setup by default it will use nginx to server a bunch of static files based on extension, but everything else, gets passed to Apache.
What it appears I was missing was that I needed RewriteEngine on in my .htaccess file. With that, it works. The previous server must have that in the main Apache config somewhere.