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 question (https://gfy.com/showthread.php?t=291541)

Pusser 05-11-2004 02:58 PM

htaccess question
 
If I want to redirect all Arabic Language Browsers would the following work:

RehahahahahaCond %{HTTP:Accept-Language} ar* [NC]
RehahahahahaRule .* http://www.yahoo.com

My question is about the "ar*" , is that correct?

I would like to avoid having multiple lines for: ar-dz, ar-bh, etc...
So I am guessing putting a * is a wildcard?

Thx!

Juicy D. Links 05-11-2004 03:04 PM

:moon :moon :moon :moon

Lycanthrope 05-11-2004 03:08 PM

yes ar is correct, but you do not need the wild card.

PrivateIvy 05-11-2004 03:10 PM

There are some really good tools/tips for htaccess here:

http://www.clockwatchers.com/htaccess_tool.html

:thumbsup

Ivy

Pusser 05-11-2004 03:12 PM

But without the wild card I would need multiple lines to block
all the Arabic codes right? i.e.:

RehahahahahaCond %{HTTP:Accept-Language} ar-dz [NC]
RehahahahahaRule .* http://www.yahoo.com
RehahahahahaCond %{HTTP:Accept-Language} ar-bh [NC]
RehahahahahaRule .* http://www.yahoo.com
RehahahahahaCond %{HTTP:Accept-Language} ar-eg [NC]
RehahahahahaRule .* http://www.yahoo.com
RehahahahahaCond %{HTTP:Accept-Language} ar-iq [NC]

I would like to block all browsers that have ar followed by anything. So if not a *, what would I use?

Thx!

Lycanthrope 05-11-2004 05:25 PM

I believe if you put a start of line anchor ie: ^ in front of the language code it'll cover them all.

^ar [NC]

would get ar-dz, ar-bh, etc...

Fabien 05-11-2004 07:55 PM

Arabic Language Browsers ?

For what ? :ak47: :BangBang:


:1orglaugh

Lycanthrope 05-11-2004 08:02 PM

Quote:

Originally posted by Fabien
Arabic Language Browsers ?

For what ? :ak47: :BangBang:


:1orglaugh

Maybe for redirecting them to dialers or worse

mryellow 05-12-2004 02:04 AM

Quote:

Originally posted by Lycanthrope
I believe if you put a start of line anchor ie: ^ in front of the language code it'll cover them all.

^ar [NC]

would get ar-dz, ar-bh, etc...

Correct. ^ is start of string $ is end of str-ing.

http://www.webpimps.com/scripts/htaccess/

-Ben

mryellow 05-12-2004 09:27 AM

oh btw...

ar*

* isn't the wildcard character the period (.) is.

.* = anything zero or more times

.+ = anything 1 or more times.

-Ben

cayne 05-12-2004 10:32 AM

Quote:

Originally posted by Lycanthrope
yes ar is correct
yep. he's right.


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

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