Are you finding index.php in the URL's of your Mautic instance?

Here is an issue I’ve come across a couple of times now when working with Mautic locally, so I thought I would document it in the forums in case anybody else experiences it.

The problem :thinking:

Mautic should not, by default, have /index.php/ in the URL anywhere. It ships with an htaccess file which should do all the rewriting without /index.php. I started seeing it popping up in my Mautic instances locally, and couldn’t figure out why.

Troubleshooting :wrench:

Usually a htaccess file deals with the /index.php/ rewriting, so that’s the first place to start.

When I was extracting the files and moving them to the appropriate folder (using the UI rather than command line, sometimes I’m lazy!) it turned out that I had not been moving hidden files.

.htaccess is a hidden file, and it wasn’t apparently moved over - it was missing from my Mautic directory. This meant my Mautic instance had no htaccess file, so nothing to do the URL writing - hence the behaviour I was seeing.

To view hidden files :bulb:

Windows: https://support.microsoft.com/en-gb/help/14201/windows-show-hidden-files
Mac: In Finder, press together Cmd + Shift + . (dot) to toggle on/off

htaccess-hidden

Solution :white_check_mark:

Simply copy the .htaccess file from the download, and paste it into your Mautic directory.

Now, navigate to your Mautic instance without the /index.php/ in the URL and all should be well.

:exclamation: Side note, you may need to manually clear your browser cache, sometimes it will cache URL.

You may also need to double check your configuration and remove /index.php/ from the URL if it is set like that from your installation.

Hopefully this should resolve the issue!

1 Like