Redirect request from specific domain
Hey guys, Ex: - root doma开发者_Go百科in - domain.com A link on example.net leads to domain.com
Could that request be redirected to domain.com/redirect/ and allow requests from other domain names to access domain.com with no redirection?
Thank you for your time and help!
I don't have an apache server with a suitable setup to test it right now, but mod_rewrite should be able to do it with something like this:
RewriteCond %{REQUEST_URI} /
RewriteCond %{HTTP_REFERER} example.net
RewriteRule ^(.*)$ http://domain.com/redirect [R=301]
精彩评论