Any action in wordpress redirects me to home page

After Spending many hours on this seemingly insoluble problem, as it turned out the issue was generated from mod security being enabled.

Although, I disabled it myself from cpanel, it had to be turned off from server and a level deeper in hosting as well.

So if you encountered this knot contact your web host in order to disable mode security.

I have also heard that turning this feature off is going to endanger my website and an extra layer of security will be lost, any suggestion about the way to sustain mod security as well as not getting involved with the prime issue?

error code: 523