PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Diriger une société d'hébergement > alt.internet.seo > OT ish... .htaccess stuff
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.internet.seo Internet search engines and related topics.

OT ish... .htaccess stuff

Réponse
 
LinkBack Outils de la discussion
Vieux 02/03/2007, 15h23   #1
Pet @ www.gymratz.co.uk ;¬)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut OT ish... .htaccess stuff

Just a quick one.
:¬)

I know it's possible to prevent IP addresses from viewing server content
using .htacces, also redirects are possible.
Is it possible to do an ip specific re-direct to an identical looking
site which is not DNS listed? e.g. ip ad. xxx.xxx.xxx.xxx goes to
http://216.71.201.170/discount-cardi...ess-equipment/
instead of
http://www.gymratz.co.uk/discount-ca...ess-equipment/

This is a political issue to do with specific IP's and un-ethical
policies and possible automated spidering that are being used to enforce
illegal pricing policies.

I'd prefer to do this domain manipulation rather than a less subtle
complete content blocking.

Cheers
Pete

--
http://gymratz.co.uk - Best Gym Equipment & Bodybuilding Supplements UK.
http://fitness-equipment-uk.com - UK's No.1 Fitness Equipment Suppliers.
http://water-rower.co.uk - Worlds best prices on the Worlds best Rower.
http://trade-price-supplements.co.uk - Bulk Order Supps. at Trade Prices
  Réponse avec citation
Vieux 03/03/2007, 19h41   #2
1100000
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: OT ish... .htaccess stuff

"Pet @ www.gymratz.co.uk ;¬)" wrote:

> Just a quick one.
> :¬)
>
> I know it's possible to prevent IP addresses from viewing server content
> using .htacces, also redirects are possible.
> Is it possible to do an ip specific re-direct to an identical looking
> site which is not DNS listed? e.g. ip ad. xxx.xxx.xxx.xxx goes to
> http://216.71.201.170/discount-cardi...ess-equipment/
> instead of
> http://www.gymratz.co.uk/discount-ca...ess-equipment/
>
> This is a political issue to do with specific IP's and un-ethical
> policies and possible automated spidering that are being used to enforce
> illegal pricing policies.
>
> I'd prefer to do this domain manipulation rather than a less subtle
> complete content blocking.


You can do it with PHP or other server-side scripting. For example:

<?php
// Redirect this IP: nn.nn.nnn.nnn
$ipshield = "nn.nn.nnn.nnn";
$visitorip = $_SERVER['REMOTE_ADDR'];
if ($visitorip == $ipshield) {
// do something here
// either redirect or show other content
// use an include statement based on the path requested
exit;
}

If you want to decrease the chance of detection I would show alternate
content rather than redirect. A spider might not follow redirects.


--
http://tips.webdesign10.com/

  Réponse avec citation
Vieux 04/03/2007, 00h01   #3
Rik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: OT ish... .htaccess stuff

Pet @ www.gymratz.co.uk <unknown@unknown.gym> wrote:
> I know it's possible to prevent IP addresses from viewing server content
> using .htacces, also redirects are possible.
> Is it possible to do an ip specific re-direct to an identical looking
> site which is not DNS listed? e.g. ip ad. xxx.xxx.xxx.xxx goes to
> http://216.71.201.170/discount-cardi...ess-equipment/
> instead of
> http://www.gymratz.co.uk/discount-ca...ess-equipment/
>
> This is a political issue to do with specific IP's and un-ethical
> policies and possible automated spidering that are being used to enforce
> illegal pricing policies.
>
> I'd prefer to do this domain manipulation rather than a less subtle
> complete content blocking.


I'm not sure wether this is the most efficient way, but hey:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx\.xxx
RewriteRule ^(.*)$ http://216.71.201.170/$1 [L,R]
--
Rik Wasmus
  Réponse avec citation
Vieux 05/03/2007, 08h41   #4
Pete @ www.GymRatZ.co.uk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: OT ish... .htaccess stuff

Rik wrote:
> Pet @ www.gymratz.co.uk <unknown@unknown.gym> wrote:
>> I know it's possible to prevent IP addresses from viewing server
>> content using .htacces, also redirects are possible.

<snip>
> RewriteEngine On
> RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx\.xxx
> RewriteRule ^(.*)$ http://216.71.201.170/$1 [L,R]


Thanks Rik.
If there is a block of 8 I.P.'s would I just drop off the last octet
eg. RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx
or could I just drop the last 2 parts
RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx\.x

Thanks
Pete
  Réponse avec citation
Vieux 05/03/2007, 09h00   #5
Rik
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: OT ish... .htaccess stuff

Pete @ www.GymRatZ.co.uk <gymratz@biggassmusclebuildingshop.gym> wrote:

> Rik wrote:
>> Pet @ www.gymratz.co.uk <unknown@unknown.gym> wrote:
>>> I know it's possible to prevent IP addresses from viewing server
>>> content using .htacces, also redirects are possible.

> <snip>
>> RewriteEngine On
>> RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx\.xxx
>> RewriteRule ^(.*)$ http://216.71.201.170/$1 [L,R]

>
> Thanks Rik.
> If there is a block of 8 I.P.'s would I just drop off the last octet
> eg. RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx
> or could I just drop the last 2 parts
> RewriteCond %{REMOTE_ADDR} xxx\.xxx\.xxx\.x


Well, you really should anchor it in that case:
RewriteCond %{REMOTE_ADDR} ^xxx\.xxx\.xxx\.x

Else, for instance, when trying to block 123.456.789.x, you might
accidentally block 321.123.456.789
--
Rik Wasmus
  Réponse avec citation
Vieux 05/03/2007, 18h38   #6
Pet @ www.gymratz.co.uk ;¬)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: OT ish... .htaccess stuff

1100000 wrote:

> You can do it with PHP or other server-side scripting. For example:
>
> <?php
> // Redirect this IP: nn.nn.nnn.nnn
> $ipshield = "nn.nn.nnn.nnn";
> $visitorip = $_SERVER['REMOTE_ADDR'];
> if ($visitorip == $ipshield) {
> // do something here
> // either redirect or show other content
> // use an include statement based on the path requested
> exit;
> }
>
> If you want to decrease the chance of detection I would show alternate
> content rather than redirect. A spider might not follow redirects.


Thanks 1100000
I am trying the .htacces route first as it seems easier to do on a
site-wide basis.

Cheers
Pete


--
http://gymratz.co.uk - Best Gym Equipment & Bodybuilding Supplements UK.
http://fitness-equipment-uk.com - UK's No.1 Fitness Equipment Suppliers.
http://water-rower.co.uk - Worlds best prices on the Worlds best Rower.
http://trade-price-supplements.co.uk - Bulk Order Supps. at Trade Prices
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h02.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12209 seconds with 14 queries