A
A
Alexey2018-08-27 05:39:44
MODX
Alexey, 2018-08-27 05:39:44

Why is the htaccess file being edited?

Site on modx revo. In the 20th of July, the site issued a 500 error. The hosting support said that htaccess was edited, this code was added:
RewriteEngine\\x20On
RewriteBase\\x20/
RewriteRule\\x20^".$rewrite_index.".php$\\x20-\\x20[L]
RewriteCond\\x20 %{REQUEST_FILENAME}\\x20!-f
RewriteCond\\x20%{REQUEST_FILENAME}\\x20!-d
RewriteRule\\x20.\\x20".$symbol_url.$rewrite_index.".php [L]
Here are the 20s again and again this damn thing.
What is this code? Hacked?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan, 2018-08-27
@aheleha

We stick this design into the htaccess file

#Защищаем .htaccess файл
<files .htaccess>
order allow,deny
deny from all
</files>

and access the file set chmod 444

A
Alexander Kuznetsov, 2018-08-27
@DarkRaven

In order: what or who edited the .htaccess file is a question that you and your host need to find out. It is quite possible that it was you yourself who opened it with a file manager and then saved it. Or maybe this is an application installed by the hosting company and it performs maintenance according to the schedule.
What is this code - it looks like a template .htaccessfor modx. \x20 is a space ( www.codetable.net/hex/20). Apparently, it is generated by the installation file. Did you install modx yourself or as a hosting application, from the control panel?

F
Froggyweb, 2018-08-27
@Froggyweb

https://modx.pro/security/16034

V
Viktor Taran, 2018-08-27
@shambler81

it's your friend spaces \\x20
saved through a "bad" editor;)
Of course it gives 500

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question