SubDomain redirect - How do you remove slug?

Hi! Feel free to point me to the proper page after reading my question :slightly_smiling_face:. I just cant find the answer anywhere else.

In my netlify.toml, I’m redirecting from https://marios-pizza.helplocal.us/ to https://www.helplocal.us/marios-pizza with status 200 (200 so that the URL doesn’t change). It’s almost working correctly, but when I navigate to https://marios-pizza.helplocal.us/ it is redirecting me to https://marios-pizza.helplocal.us/marios-pizza. The slug has been added to end of the URL.

Does that make sense? I can’t figure out how to drop the “/marios-pizza” from “https://marios-pizza.helplocal.us/marios-pizza

Many thanks in advance if you are able to point me in the right direction. Thanks! -Ken

are you doing this with a _redirects file? if yes, post it here and we’ll take a look. :slight_smile:

Hi @perry! Im using the netlify.toml

Here are the contents of that file

[[redirects]]
 from = "https://marios-pizza.helplocal.us/"
 to = "https://www.helplocal.us/marios-pizza"
 status = 200
 force = true

Hi @perry :slightly_smiling_face:

Just curious if you were able to see what I was doing wrong here or if this is possible. Thanks for any help here!

Hey @ken, thanks for your patience on this! I believe your repo configuration is already set up to work for this (you have marios-pizza content in its own directory). Do you want to try something like this:

[[redirects]]
 from = "https://marios-pizza.helplocal.us/"
 to = "/marios-pizza"
 status = 200
 force = true

or with asterisk and splat:

[[redirects]]
 from = "https://marios-pizza.helplocal.us/*"
 to = "/marios-pizza/:splat"
 status = 200
 force = true

I’m linking a few posts related to this that may be helpful for you:
https://answers.netlify.com/t/forwarding-subdomain-to-a-path/2988/2
And:

Let us know how it goes for you and if you continue to run into issues!