What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello! I would like to make a redirect from `Yves` to the merchant portal. I would like to redirect

martin
martin Spryker Solution Partner Posts: 49 🧑🏻‍🚀 - Cadet

Hello!

I would like to make a redirect from Yves to the merchant portal. I would like to redirect <https://yves.de.spryker.local/merchant> to <http://zed.de.spryker.local/security-merchant-portal-gui/login> . Using AbstractController::redirectResponseExternal would work but seems like not the best solution for this.

Is there a better approach to redirect an URL from Yves to Zed?

Comments

  • U01LE4BMBK7
    U01LE4BMBK7 Posts: 241 🧑🏻‍🚀 - Cadet

    I think AbstractController::redirectResponseExternal is the only way as Spryker doesn't provide a redirect from Yves to Zed. For the url you could access the ApplicationConstants::BASE_URL_ZED (use Spryker\Shared\Application\ApplicationConstants) config value to get Zed's url

  • martin
    martin Spryker Solution Partner Posts: 49 🧑🏻‍🚀 - Cadet

    Thank you, this is what I'm looking for. However, when using Spryker\Shared\Config\Config::get(ApplicationConstants::BASE_URL_ZED) it returns me not-configured-host instead of the actual URL.

  • Have you considered wiring this into webserver/gateway configuration?

  • martin
    martin Spryker Solution Partner Posts: 49 🧑🏻‍🚀 - Cadet

    No, I did not consider this, but wouldn't that lead to the same problem that I don't know the exact Zed Url?