开发者

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]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜