2

Preconditions

  • Magento 2.2.4 PHP 7 Sub-directory setup

Steps to reproduce

  1. Setup sub-directory magento 2 mine site/buy/
  2. Install a supported theme for Magento 2. I have install novetty theme
  3. Update theme using ssh access and putty
  4. Trying to change the theme from Design Configuration section
  5. Showing 404 page from root site.

Details I have install magento 2.2.4 on my site sub-directory. Every thing was properly installed and worked. But when I install a new theme, its was setup properly. I try to change the from the default one to new theme its showing 404 page. Example are given. Could you please help me fix it.

enter image description here

enter image description here

6
  • Looking at the screenshot, it seems like you have a WordPress installation also working in the same directory. Jun 12, 2018 at 8:17
  • I use wordpress to my main directory but magento 2 in sub directory
    – RebekaSara
    Jun 12, 2018 at 8:36
  • Try to rename .htaccess file under WordPress directory. Jun 12, 2018 at 9:20
  • Ok, I don't understand. Do I need to change any code for wordpress .htaccess? or just try to rename the .htaccess like .oldhtaccess. Please explain.
    – RebekaSara
    Jun 12, 2018 at 9:38
  • Just check by renaming .htaccess like .oldhtaccess. Jun 12, 2018 at 9:54

1 Answer 1

6

Solution 1: Try Changing the apache mod_security module from ON to OFF then this error will remove.
For reference you can visit this page:
https://community.magento.com/t5/Magento-2-x-Admin-Configuration/Admin-Changing-Theme-Content-Design-Configuration-Help-Need/m-p/74196#M1681

Solution 2 Try removing the script code in the header or footer on the configuration page and then try to save the page. This solution worked for me. I hope it will work for you also.

Main Issue: By default ModSecurity module in apache doesn't allow to write script code in the header or footer section of the Design store Configuration page. That's why when we try to save the page it gives us 404 page not found error.

2
  • May i know where to change mod_security module from ON to OFF ?
    – fudu
    Oct 21, 2021 at 9:59
  • If you have the Cpanel Access you can change it there otherwise you have to make changes in the apache configuration file, you can find that file according to your operating system by googling. Jan 15 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.