Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
366 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 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...