Mautic new domain error 404

Your software
My Mautic version is: 3.0.2
My PHP version is: 7.3

Your problem
My problem is: after change domain Mautic return error 404

how is the right way to change domain, in database exist anyone domain URL to put?

These errors are showing in the log:

no logs, no error.log

Steps I have tried to fix the problem:

clear cache
remove https
fix permissions
fix user:groups

Hi,
Edit /app/config/local.php
(new domain)
And then rebuild cache.

1 Like

already done this tip

when i acess
http://mautic.domain/
redirect to
http://mautic.domain/s/dashboard
and return 404

in version 3.0.2 site_url contains /index.php?

now return ERR_TOO_MANY_REDIRECTS

in database is needed add url in some place

Can you plz try this:
Are you using https?

with and without i already tried

Okay, what happens if you add this to index.php first line?
$_SERVER[‘HTTPS’] = ‘on’;

I tried your tip, but not give me success

after comment this in .htaccess
#RewriteEngine on
#RewriteCond %{HTTP_HOST} ^mautic.segredosdoprogramacasaverdeeamarela.com$
#RewriteRule ^/?$ “http://^(?!/(index\.php|index_dev\.php|app|addons|plugins|media|upgrade|upgrade_v3))(/(.*))$” [R=301,L]

return error
ERR_INVALID_REDIRECT

PS: using https:// in url on local.php

i already tried everything

in database don’t have url like wordpress?

Ok. Worth a shot.

The problem is usually like this:

  • site url in local.php
  • site url in apache
  • https/http redir fails
  • cache issue (needs rebuild)
  • hidden files not moved - causes error

i update to 3.1.0 on command line
php bin/console doctrine:migrations:status

 >> Previous Version:                                   Already at first version
    >> Current Version:                                    0
    >> Next Version:                                       2018-11-11 09:54:47 (20181111095447)
    >> Latest Version:                                     2020-08-15 15:37:11 (20200815153711)
    >> Executed Migrations:                                0
    >> Executed Unavailable Migrations:                    0
    >> Available Migrations:                               13
    >> New Migrations:                                     13
WARNING! You are about to execute a database migration that could result in schema changes and data loss. Are you sure you wish to continue? (y/n)y
Migrating up to 20200815153711 from 20200220172041

  ++ migrating 20200227110431

     -> CREATE INDEX dnc_channel_id_search ON lead_donotcontact (channel_id)
Migration 20200227110431 failed during Execution. Error An exception occurred while executing 'CREATE INDEX dnc_channel_id_search ON lead_donotcontact (channel_id)':

SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'dnc_channel_id_search'

In AbstractMySQLDriver.php line 106:

  An exception occurred while executing 'CREATE INDEX dnc_channel_id_search ON lead_donotcontact (channel_id)':

  SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'dnc_channel_id_search'


In PDOConnection.php line 80:

  SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'dnc_channel_id_search'


In PDOConnection.php line 75:

  SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'dnc_channel_id_search'

I changed my domain in Configuraiton “Site URL”. Are you getting a mautic login prompt? If not then I think it’s the web server. Usually in either Nginx or Apache there is a Server Name field that you should change, too. That’s what I had to changed when I did it.

Restore from backup and try again as your 3.1 upgrade failed.

restore backup from 3.0.2
run before migrations
after upgrade to Mautic 3.1.0

acess site url http and login show, acess admin and change to https (apply and save)

solved now my mautic is back