homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Combining RewriteConds

 12:19 am on Sep 29, 2003 (gmt 0)

Can these two strings..

RewriteCond %{HTTP_REFERER}!^http://babel\.altavista\.com/.*www\.mydomain\.net
RewriteCond %{HTTP_REFERER}!^http://babelfish\.altavista.com/.*www\.mydomain\.net

...be combined into this?

RewriteCond %{HTTP_REFERER}!^http://babel.\.altavista\.com/.*www\.mydomain\.net

...or should it be writtenthis way?

RewriteCond %{HTTP_REFERER}!^http://babel(fish)\.altavista\.com/.*www\.mydomain\.net




 12:24 am on Sep 29, 2003 (gmt 0)


RewriteCond %{HTTP_REFERER} !^http://babel(fish)?\.altavista\.com/.*www\.mydomain\.net

The "?" makes the preceding character or group (bounded by parentheses) optional.

Ref: [etext.lib.virginia.edu...]



 12:31 am on Sep 29, 2003 (gmt 0)

Terrific, thanks Jim.

While we're on the subject (he he) have you ever seen AV's translator referral written as "babel"? Because all the referrers I see are "babelfish"

So unless both really do exist, I might just go with the second one anyway.


<added> works fine, might as well not try to fix it anymore ;)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved