Jump to content

Mod_Security Error when clicking on ad


wisconsindad

Recommended Posts

I am getting the following error when clicking on banner ads using any of the invocation codes, including the async code.

Not Acceptable!

An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.

Notes:

1. I checked permissions on cl.php and the folder containing it and they are 644 and 755 respectively.

2. Php version is 7.3

3. We are using hostgator as our server. 

 

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...
  • 9 months later...
  • 1 month later...
  • 4 weeks later...
  • 1 year later...
  • 2 weeks later...

I solved this problem commenting the line 3636 of ajs.php and added a new line without the variable $aBanner['url']. The code was finally like:

#$dest = _adRenderReplaceMagicMacros($aBanner, $customDestination ?? $aBanner['url'] ?? '');
$dest = _adRenderReplaceMagicMacros($aBanner, $customDestination ?? '');

This prevents that the parameter "dest=[url]" be included in the url of the banner clickthrough, which is the reason mod2_security module blocks the invocation of the url.

Zabdiel

Edited by Zabdiel
Link to comment
Share on other sites

The solution above works for Javascript tag and for Iframe code, although in this case, the file to be edited is afr.php line 3635. I hope it helps you.

 

#$dest = _adRenderReplaceMagicMacros($aBanner, $customDestination ?? $aBanner['url'] ?? '');
$dest = _adRenderReplaceMagicMacros($aBanner, $customDestination ?? '');

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...