We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My app serves up multiple domains. Is there a way to scope the rewrite to only one of them.
Essentially something that would allow this:
r301 'http://www.domain1.com/something', 'some-other-location'
So http://www.domain1.com/something would redirect, but http://www.domain2.com/something would not.
http://www.domain1.com/something
http://www.domain2.com/something
The text was updated successfully, but these errors were encountered:
https://github.com/jtrupiano/rack-rewrite#host should work
Sorry, something went wrong.
@ShaneBoyer this solution doesn't actually seem to work for my case.
I've got:
r301 "/app", "/some-marketing-url", host: "www.domain1.com" r301 "/app", "/another-marketing-url", host: "www.domain2.com"
The first rule applies. But the second redirect gets caught up by the first rule.....
No branches or pull requests
My app serves up multiple domains. Is there a way to scope the rewrite to only one of them.
Essentially something that would allow this:
r301 'http://www.domain1.com/something', 'some-other-location'
So
http://www.domain1.com/something
would redirect, buthttp://www.domain2.com/something
would not.The text was updated successfully, but these errors were encountered: