cancel
Showing results for 
Search instead for 
Did you mean: 

Admin URL redirect to a weird url

SOLVED

Admin URL redirect to a weird url

Hi,

 

I'm learning on a test server magento and I got this issue : when i go to the admin panel, i'm redirected to a weird url.

 

My url : http://m2.esprit-ktm.ham05.com/

My adminuri is ok i checked it in Magento env.php.

When i try to connect to my admin panel i'm redirected to : http://index.php/adminham/http:/index/index/index.php/adminham/admin/index/index/key/36b1fa9fd17a2a5...

 

I also checked in the database, in core_config_data the urls seems good to me.

 

If someone has a solution please, thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Admin URL redirect to a weird url

Hi,

Thanks for your help, the problem came from a Module I installed previously.

 

setup:di:compile solved the problem.

 

Thank's again.

View solution in original post

5 REPLIES 5

Re: Admin URL redirect to a weird url

Have you checked your server apache configuration for such redirection?

 

It could also be in a ".htaccess" file in your root directory or elsewhere...

 

The last place I would check would be in the "url_rewrite" table.

 

Note that I was unable to access your URL "http://m2.esprit-ktm.ham05.com/", got a 404 error. Neither the "http://esprit-ktm.ham05.com/", but was able to reach "http://ham05.com/" just once!

 

 

 

Re: Admin URL redirect to a weird url

Hi @cemyildiri8b54 

Please check If your issue is related to this
https://github.com/magento/magento2/issues/21454
if you are facing similar issue , It is fixed in this Pull Request 

 

If my answer is useful click Kudos & Accept as Answer

Re: Admin URL redirect to a weird url

Hi,

Thanks for your help, the problem came from a Module I installed previously.

 

setup:di:compile solved the problem.

 

Thank's again.

Re: Admin URL redirect to a weird url

  1. Make your magento directory name as much as simple by avoiding underscore or other special characters. Magento allows '-' (dash) as name in directory name.
  2. After that change base_url from "core_config_data" table with the new name
  3. Clear the cache and try again to load an admin

Re: Admin URL redirect to a weird url

What module caused the issue? I am having the same problem. Recompile helps but it doesnt last long