skip to Main Content

My task is to add new shopping cart price rule in magento admin section. I have added rule information, then I need to add conditions for that rule .When I change the condition select box option, it’s redirected to dashboard.

In the chrome console it shows 403 forbidden error in the ajax url.

Somebody told me to disable mod_security. I have written the below code in .htaceess file, but still the problem continues.

.htacesss :


  SecFilterEngine Off
  SecFilterScanPOST Off

I am using Magento version. 1.9.3.8

How to fix this please help me.

2

Answers


  1. Chosen as BEST ANSWER

    Fixed the Ajax 403 forbidden redirect issue in magento

    Modified a single line in rule.js file. (path : /var/www/vhosts/site.com/htdocsnew/js/mage/adminhtml/rule.js)

    Old

    {form_key: FORM_KEY, type:new_type.replace('/','-'), id: new_id }

    New

    {form_key: FORM_KEY, type:new_type.replace('/','-'), id:"'"+new_id+"'" }


  2. -Check file permissions

    First, you need to check the file permissions that each of your files has set. If a file or folder is set to “777” which is “world” writable for security reasons the 403 error will be displayed to protect your website from hacks. Folders should have the permissions set to “750” or “755” and files should be set to “644”.

    If you have SSH Access, you can resolve this easily. Make sure you’re in the root directory of your Magento installation, and then execute the commands.

    If this will not work then you can check ‘promo_catalog/newConditionHtml” is overriden anywhere in your code, local.

    Also,
    Check “No Index” in .htaccess file

    Once you have verified that all the permissions are correct but the issue still persists, you will need to check your .htaccess file. Keep in mind that you can have multiple .htaccess files in your account, so you may need to search / modify .htaccess files other than public_html/.htaccess. For example, if you have an addon domain located at public_html/addon_domain, you’ll need to check any .htaccess files within that folder as well. If one of the lines in the actual file says “Options All -Indexes” then simply remove “-Indexes” and save the file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search