Issue with Search Result URL Redirecting to "localhost"

Hello everyone,

I’m encountering an issue when conducting a search on the app. After initiating the search, the URL of the search result switches from the hostname to “localhost,” which prevents me from retrieving the page. Could anyone provide insight into resolving this issue?

Example :
localhost/index.php?action=DetailView&module=Accounts&record=3503270e-7f03-539c-1144-65e0abe55530&offset=1

Instead of :
hostname/index.php?action=DetailView&module=Accounts&record=3503270e-7f03-539c-1144-65e0abe55530&offset=1

Thank you in advance !

Please look at the site_url variable in the config.php or config_override.php

It should have your current crm url

It could also be a misconfigured web server doing an URL rewrite.

Thank you for your suggestion! I’ll check the site_url variable in both config.php and config_override.php files to ensure they have the correct CRM URL.

Just to clarify, would the process remain the same if we’re using Docker for the deployment? Or are there any specific considerations or configurations needed within the Docker environment to address this issue?

I’d like to add that the URL used to retrieve the page was pointing to my defined hostname without any changes in configuration. However, over the past two weeks, it has started redirecting to “localhost” without any apparent modification.

There are no definite answers for your questions, it depends on configurations.

First, you need to start by finding out who is changing the URL, it’s probably either SuiteCRM or the web server.

[SOLVED]
I tried what @abuzarfaris said and it worked perfectly !

In terms of configuration, I have set up SuiteCRM8 in Docker Swarm. I haven’t customized the SuiteCRM configuration files yet; the configurations are mostly done through the GUI.

Thanks for all your help!

1 Like