Hello,
I’ve successfully managed to install Mautic in a subfolder.
While Mautic is typically set up in the root domain, I chose to keep my root domain for the website and install Mautic in a separate subfolder.
To achieve this, I modified the .htaccess file by adding “XXX” at the start of the path.
<If “%{REQUEST_URI} =~ m#^/XXX/(index|index_dev|upgrade/upgrade).php#”>
This method has worked well, but each time Mautic is updated, the .htaccess file is overwritten. As a result, I have to redo the changes after every update.
Is there a more efficient way to handle this situation?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Heya @simoabdel,
There are a couple of ways to go about this.
The first one would be to
chattr
and make the file immutable. No one can make changes to it afterward unless you remove that attribute. You can check this here for more information on the topic :https://www.digitalocean.com/community/questions/what-are-file-directory-attributes
The second way I can think of is for you to create a script that would be executed on a cron or on a service at certain point of time.
Hi everyone,
If you have similar needs to mine, here are a couple of solutions that worked for me:
Install Mautic on a Subdomain: This approach is clean and helps avoid conflicts, making management easier.
Add Custom Directives in the Virtual Host Configuration:
To ensure that custom directives are preserved during Mautic upgrades, add them directly to your Apache virtual host configuration file.
For my setup with the root domain, the configuration file is located at: /etc/httpd/sites-available/www.primeogroup.com.conf
I included the following directives:
These directives help control access to specific files and prevent future Mautic updates from overriding these settings.
Hope this helps!