× Here you can get community support related to ReDJ.

"Block" certain link to my site?

  • limaeasy
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #2231 by limaeasy
"Block" certain link to my site? was created by limaeasy
Is it possible to block or redirect a link to my site (from another website) with ReDJ?

For example:

The site www.somesite.com/article is linking to www.mysite.com

Is it possible to "defer" or "return" the incoming visitor to www.somesite.com/

(Only visitors from www.somesite.com/article should be affected)

TNX

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #2234 by admin
Replied by admin on topic "Block" certain link to my site?
Hi,
this redirection could be performed checking the referral. The bad news is this is not possible with ReDJ (redirection rules works on called URLs, not on header data). The good news is this could be done with a rewrite rule in .htaccess.

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

  • limaeasy
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #2239 by limaeasy
Replied by limaeasy on topic "Block" certain link to my site?
Hello Luigi,

Thank you for pointing me in the right direction! I'll have a look at .htaccess file to solve this...

TNX

Tim

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #2240 by admin
Replied by admin on topic "Block" certain link to my site?
Ok,
it should be easy, after:
RewriteEngine On

Add something like:
RewriteCond %{HTTP_REFERER} badsite\.com [OR]
RewriteCond %{HTTP_REFERER} anotherbadsite\.com
RewriteRule ^ %{HTTP_REFERER} [R,L]

Not tested, so maybe it should be adjusted a little... :)

Kind regards,
Luigi
Last edit: 10 years 1 month ago by admin.
The following user(s) said Thank You: limaeasy

Please Log in or Create an account to join the conversation.

  • limaeasy
  • Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 1 month ago #2243 by limaeasy
Replied by limaeasy on topic "Block" certain link to my site?
PERFECT!!!

I adjusted your example to my (site) needs and it works as I needed it.

Thank you for going way beyond the scope of the product support you would receive anywhere else :P

Greetings,

Tim

Please Log in or Create an account to join the conversation.

More
10 years 1 month ago #2246 by admin
Replied by admin on topic "Block" certain link to my site?
Hi Tim,
it is just because I like to help my neighbor... :)

Kind regards,
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.097 seconds