404 error on wordpress website for litespeed webserver

In case you are getting "404 page not found" error on wordpress website, then you need to edit your .htaccess file and replace the existing wordpress rules with these rules :

RewriteBase /
RewriteRule ^/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

 

“/” is the location WordPress was installed relative to the vhost docroot.

Save the file and restart litespeed. 

Note:

In case you are using cyberpanel, then make sure you edit the .htaccess file from the filemanager and save it once from there. Directly editing the file from terminal doesn’t seems to work in the way it works.

 

Was this answer helpful? 0 Users Found This Useful (0 Votes)