I'm trying to rewrite a filename based on the server's domain.
This code below is wrong / not working, but illustrates the desired effect.
<If "req('Host') != '*.mydevserver.com'">
RewriteRule "^/robots\.txt$" "robots-staging.txt" [R]
</If>
Desired effect is this htaccess will point to a different robots.txt depending on if it's on staging (wildcard subdomain) or not.
Example usage:
http://client1.devsite.com/robots.txt
rewritten to
http://client1.devsite.com/robots-staging.txt
http://client2.devsite.com/robots.txt
rewritten to
http://client2.devsite.com/robots-staging.txt
https://client.com/robots.txt
not rewritten
https://myclient.com/robots.txt