Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
370 views
in Technique[技术] by (71.8m points)

There is an unwanted .htaccess file with "Order Allow,Deny" in all my wordpress subfolders

I have wordpress 5.6 installed on Directadmin. I have several folders with other CMS installed, like joomla. today I noticed that I can't login to subfolder CMS eg. mysite.com/joomla. after some hours of searching, I found that in ALL my subfolders there is a .htaccess file with the following code:

<FilesMatch ".(phtml|php|PhP|php5|suspected)$">

Order Allow,Deny allow from all

in subfolders my main htaccess files were removed.

in the main directory, public_html, my main .htaccess was changed to .htaccess.bk and there was a newly generated .htaccess file with the following code inside:

<FilesMatch ".(phtml|php|PhP|php5|suspected)$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch "(index).php$">
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "(wp-load).php$">
Order Allow,Deny
Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

I don't understand why it has happened. Is it a kind of hacking? I haven't installed any plugin lately. Can anyone help please?

question from:https://stackoverflow.com/questions/65895783/there-is-an-unwanted-htaccess-file-with-order-allow-deny-in-all-my-wordpress

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...