Hi @edemkodzo
It looks like you are having problems with the rewrites.
Is a new server or this website was working fine in this one and suddenly stops working? Which web server are you using?
If you are using Apache, can you check that mod_rewrite is enabled?
Can you share the content of your virtual host (Apache) or server block (Nginx)?
Please, add any other information that you think may be helpful in resolving the problem.
Have a nice day
Since i couldn’t find any in my site folders, i created one in /var/www/html/.htaccess and input:
.htaccess file should be here /var/www/html did you list hidden files and check ?
-
This reply was modified 2 years, 8 months ago by corusx.
Hi @corusx
I can’t access to your server, so I can’t check your files.
I understand you have your WordPress installation at /var/www/html/
Your .htaccess file should be in the same folder. Please, use the content from this link to your .htaccess file.
Please, check this article https://kinsta.com/knowledgebase/wordpress-htaccess-file/ for further information about the .htaccess file.
Have a nice day
Hi @edemkodzo
If your question has been answered, we would love if you would mark this topic as resolved in the sidebar. This helps our volunteers find the topics that still need attention and more people will get helped, possibly like you did.
Have a nice day
@amieiro I am using Aliyun ECS webserver.
The site was working well then suddenly got an “error establishing database connection” which i solved and now this “Not found” problem.
Yes @corusx hidden file are all showing but there was no .htaccess file in var/www/html/ except the one I created.
I found an .htaccess file in var/www/html/wp-content/ai1wm-backups/ and it contains:
<IfModule mod_mime.c>
AddType application/octet-stream .wpress
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
So I added
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
to the bottom and save it then restarted my server with :sudo apachectl restart
yet nothing changed. then , I commented this part:
<IfModule mod_mime.c>
AddType application/octet-stream .wpress
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
<IfModule mod_autoindex.c>
Options -Indexes
</IfModule>
by adding a # at the beginning of each line but that still didn’t solve the problem. That’s what lead me to create my own .htaccess file in the var/www/html/ folder. But that also didn’t help!
My problem is still not solved. I’m yet still getting the : ‘Not Found
The requested URL /news-feed/ was not found on this server.’ messages. :((