skip to Main Content

I have implemented a question and answer forum for programming questions using WordPress.
Wordfence plugin is installed on my WordPress system.
Content of posts have programming code with syntax highlighter.
ِData are inserted as AJAX request.
The following error occurs when I use html syntax in posts:

A potentially unsafe operation has been detected in your request to this site
Your access to this service has been limited. (HTTP response code 403)

If you think you have been blocked in error, contact the owner of this site for assistance.

Block Technical Data
Block Reason:   A potentially unsafe operation has been detected in your request to this site

The code I want to insert is:

function redirect($url)
{
    @header('location: ' . $url);
    exit('<meta http-equiv="Refresh" content="0;url='. $url .'">');
}

Will this problem be solved if the post is not inserted as ajax?
What’s the solution?

2

Answers


  1. Wordfence is like Norton and will block/kill certain things.
    Try to visit your site with ?page_id=../../../../../etc/passwd
    it will trigger wordfence even if page_id is not a valid parameter.

    uninstall wordfence

    Login or Signup to reply.
  2. please try to use wordpress functions like this:

    function redirect($url)
    {
        wp_redirect($url, 301);
        exit;
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search