Home > Net >  OpenLiteSpeed WordPress VPS 404 Error on Non-Wordpress Site Install in Sub Folder
OpenLiteSpeed WordPress VPS 404 Error on Non-Wordpress Site Install in Sub Folder

Time:01-03

I have an OpenLiteSpeed VPS WordPress install over at Vultr, and am trying to install a non-WordPress website into a sub-folder I created.

Ex.) https://example.com/test that is pointed to a new folder I created in the WordPress root install directory of /var/www/html/test

I created the directory and placed the files needed there that include an index.php file, however when I go to https://example.com/test, I receive a 404 Not Found error. I believe it has something to do with modifying the .htaccess file in the root of my WordPress install, but am unsure of what to modify 100%.

Any help is appreciated!

I tried modifying the Rewrite rules but am not confident in the options I chose. I since reverted the .htaccess file back to my default settings in which OpenLiteSpeed defines.

CodePudding user response:

Add the following lines of code to the top of the htaccess file:

RewriteEngine On
RewriteBase /
RewriteRule ^test - [L]

This should allow requests to https://example.com/test to be handled by the non-WordPress site in your subdirectory, rather than being handled by WordPress. Note that this will only work if the subdirectory contains an index.php file or an index.html

If you are still experiencing a 404 error after modifying the .htaccess file, there could be other issues at play. It might be helpful to check the Apache error logs on your server to see if there are any error messages that can give you more information about the issue.

CodePudding user response:

This can be closed out - I have it defined in my index.php file that resides in that folder point to a database I created in phpMyAdmin and I had the database field filled out incorrectly. Thank you to everyone who replied though. Oops!

  • Related