-1

I want to redirect all the request like url/api/something to a different port (say 8000) with the same base URL

RewriteCond %{REQUEST_URI} ^/api/\w*$ [NC]
RewriteRule ?

What is the RewriteRule?

Thanks for helping!

xuc
  • 1

1 Answers1

0

If you want a rule:

RewriteRule ^(.*)$ https://123.45.67.891:3000/$1 [L,R=302]

If you want a condition:

RewriteCond %{SERVER_PORT} ^2000$
phoops
  • 2,073
  • 4
  • 18
  • 23