Ibon Azkoitia
Mapping a custom domain for redirections (url shortener)
The thing is that I'm not expert with servers, but I defend myself with API. So I manage to make it work that way
In the handleRegistration function I added the Http::put and worked fine
16 replies
Mapping a custom domain for redirections (url shortener)
So, it seams the option is to use the Forge API to add aliases:
https://forge.laravel.com/api-documentation#add-site-aliases
16 replies
Mapping a custom domain for redirections (url shortener)
It seems that Forge creates a file so not configured domains do not work
https://forge.laravel.com/docs/sites/the-basics.html#protecting-against-unconfigured-domains
I moved the file to parent folder and removed the alias for the extra domain and still works. Will try to add another domain to test it if just with DNS change works.
Also, if this works, I suppose have to add a functionality (on the route) to find if that domain is in the Database so I limit (me, not Forge) which domain works.
Important if you are reading this: I'm not a developer, maybe I'm doing awful things.
16 replies
Mapping a custom domain for redirections (url shortener)
It works! Without SSL for now » https://ibon.tech/dudvf0
https gives an error, will search more info about it
Edit: now works with SSL also. will update this thread if I manage to automate things so other people can see it
16 replies
Mapping a custom domain for redirections (url shortener)
Hello Dennis, thank you for your reply.
Well, I'm not saying it's an error per se. I just don't know how to handle that situation.
I will add realistic data so it's easier for examples:
- Project domain: prolinks .pro
- Project Filament Admin: prolinks .pro/app/
- Tenant Admin Url: prolinks .pro/app/ibontech
- Tenant custom domain field: ibon .tech
- Ibon .tech edit DNS A record to = Server IP where the project is located
Situation 1 » Creating a url with the slug "dudvf0"
- Example "prolinks .pro/dudvf0" (you can try it)
- It works, it redirects to "productividad .pro"
- Not the use case I'm looking for, I want users to use their own custom domain
Situation 2 » Creating a url with the slug "dudvf0"
- Example "ibon .tech/dudvf0" (you can try it)
- It doesn't work, domain gives error "ERR_EMPTY_RESPONSE"
Routes code for the fallback using the "prolinks .pro" base url before slug
I'm not an expert developer, so maybe I'm not explaining myself correctly.
Thank you!
16 replies