简体   繁体   中英

404 Errors after renaming htaccess to reroute from 403 (can't access Wordpress wp-admin)

The website I'm working on went down last week from a spike in traffic (I think it was a DNS attack based on the logs).

I fixed it and have the main index page up after renaming the .htaccess to htaccess.txt in their public_html folder.

The main index is fine. It works on all the links that take the user to different sections, but when clicking through to an interior page, there's a 404 now.

I can't figure out how to reroute it.

I added

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

to the htaccess.txt , but I also get

Warning: Cannot modify header information - headers already sent by (output started at /home3/login/public_html/wp-load.php:117) in /home3/login/public_html/wp-includes/pluggable.php on line 1174

when hitting wp-admin .

EDIT: after digging in on the PHP files, we realized it was a malware attack that started the whole thing. We got the htaccess and 403/404 stuff fixed, but since we're launching a wholly new site soon (on Rails rather than WP), there's not a lot of sense in digging through corrupted PHP. Thanks for all your help, folks.

Inspect both the files mentioned in the error. Likely wp-load.php has been hacked, and even though the nastyness may have been removed, it is sending output to the browser BEFORE WP tries to start a session. Inspect those files, check for blank lines before and after the opening/closing PHP tags. You might also consider downloading ALL files that make up that site and running a good virus scanner over it all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM