开发者

proper redirect with .htaccess

开发者 https://www.devze.com 2023-04-01 07:29 出处:网络
Is there a way to redirect a client, with .htaccess based on an IP in such a 开发者_如何学Goway that if they log their path, instead of seeing your site they only see the one that they are redirected

Is there a way to redirect a client, with .htaccess based on an IP in such a 开发者_如何学Goway that if they log their path, instead of seeing your site they only see the one that they are redirected to?


You could try something like this inside your .htaccess file

RewriteCond %{REMOTE_ADDR} ^123\.123\.123\.123
RewriteRule ^index\.html$ http://othersite.com [R=301,L]

If they're using any sort of tool that can detect packets, or header information, they'll see what's going on behind the scenes; however, they won't ever notice it in their browser experience.

0

精彩评论

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