How can I redirect my root domain with NGNIX?

Brajet

Active member
Joined
Jun 4, 2025
Messages
2,594
Reaction score
0
Points
36
Long time lurker here, but my conversion from caddy to NPM has been overall easy and smooth but one thing i easily succeeded with was redirecting paths on the root domain in caddy, but i cannot seem to figure out how to achieve that with NPM.

so far, i've redirected my root domain without paths: {MY_DOMAIN}.com goes to reddit's home page for example

what i want to achieve is this: {MY_DOMAIN.}.com/{PROMOTIONAL_WORD} goes to twitter's home page instead

all redirected as 302 unless there's a better redirect code that will help ease the browser's process

help is greatly appreciated!
 
  • We value your privacy

    We use essential cookies to make this site work, and optional cookies to enhance your experience.

    See further information and configure your preferences

    These cookies are required to enable core functionality such as security, network management, and accessibility. You may not reject these.
    We deliver enhanced functionality for your browsing experience by setting these cookies. If you reject them, enhanced functionality will be unavailable.
    Cookies set by third parties may be required to power functionality in conjunction with various service providers for security, analytics, performance or advertising purposes.
Top