htaccess tweak for Mautic in a subfolder

There are different ways to install Mautic.

  1. As a subdomain eg: mautic.mydomain.com or
  2. as in folder from your main domain eg: mydomain.com/mautic

The tweak to the htaccess below should only be applied if you are using option 2.

Firstly, some context, read this Github issue.

This tweak applies to both apache 2.4 and greater and older vresion less than 2.4.

For reference to the original .htaccess click here.

So how do we solve the error?

Find the following lines in the htaccess, depending on if you use apache 2.4 > or 2.4 <. There should be 2 entries in the htaccess file.

<If "%{REQUEST_URI} =~ m#^/(index|index_dev|upgrade/upgrade)\.php#">

Update this line to add the folder in which your mautic installation resides. If your folder is /mautic/, then simply use the code below. If it is something else, update as needed.

<If "%{REQUEST_URI} =~ m#^/mautic/(index|index_dev|upgrade/upgrade)\.php#">

Leave your comments and issues on this thread on Github.

About us

E:

We are a web development agency located in Cape Town, South Africa. We design great looking websites. We are CSS enthusiasts. We specialise in Content management systems. We are a professional Team with over 30 years of experience. Learn more.

facebook  linkedin  twitter  linkedin

Office South Africa

E: za [AT] raramuridesign [DOT] com
T:
 +27 21 913 7872
Mon - Fri 09h00-16h30 (ZA)