GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htaccess setenvif php Question (https://gfy.com/showthread.php?t=336515)

Dusen 08-05-2004 07:24 AM

.htaccess setenvif php Question
 
Is there anyway I can use the setenvif variable in .htaccess to identify a site-sucker bot and use php to address it?

like setenvif *rule* something=Sucker

<?php

$id=StripURL($HTTP_SERVER_VARS["SOMETHING"]);

?>

Brad Gosse 08-05-2004 08:13 AM

I am bumping this thread because I want to know the answer to the same question.

Anyone?

fris 08-05-2004 08:29 AM

never done that before post a question on phpbuilder.com should have the answer in 5 to 10 mins

FiReC 08-05-2004 09:46 AM

i know its not fool proof but you could always use $_SERVER['HTTP_USER_AGENT'] to check if its a well known bot.

Dusen 08-05-2004 11:39 AM

I guess my MODIFIED, more clear question should be, and it is more apache than php:

Is there any way I can use rules in an htaccess file to set an environment variable that I can read via php with $HTTP_SERVER_VARS ?

I.e. set the AUTH_USER to something I define like "GFY" and get it in php via $HTTP_SERVER_VARS["AUTH_USER"]

Dusen 08-05-2004 11:52 AM

Solved.

SetEnv


All times are GMT -7. The time now is 03:36 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123