| 
 
 
 | 
| Keep Server Online 
 If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
 
 or
 
 
   
 A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
 
 Thank You! Steffen
 
 Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
 |  | 
 | 
| | 
| | 
|  Topic: Convert code Apache 2.2 to 2.4? |  |  
| Author |  |  
| uzay 
 
 
 Joined: 15 Oct 2018
 Posts: 1
 Location: Germany, Berlin
 
 | 
|  Posted: Mon 15 Oct '18 20:53    Post subject: Convert code Apache 2.2 to 2.4? |   |  
| 
 |  
| Hello! Can anyone convert this code from 2.2 to 2.4?
 Thank you in advance!
 ==============================
 order deny,allow
 
 SetEnvIfNoCase Referer "^$" bad_user
 SetEnvIfNoCase User-Agent .*msn.* search_robot good_user
 SetEnvIfNoCase User-Agent .*xml-sitemaps.* search_robot good_user
 
 Deny from env=bad_user
 Allow from env=good_user
 ===================================
 |  |  
| Back to top |  |  
| James Blond Moderator
 
  
 Joined: 19 Jan 2006
 Posts: 7442
 Location: EU, Germany, Next to Hamburg
 
 | 
|  Posted: Tue 16 Oct '18 23:04    Post subject: |   |  
| 
 |  
| Example 
 
  	  | Code: |  	  | SetEnvIf Referer "^http://www\.example\.com/" local_referal # Allow browsers that do not send Referer info
 SetEnvIf Referer "^$" local_referal
 <Directory "/web/images">
 Require env local_referal
 </Directory>
 | 
  	  | Code: |  	  | 
 Sure you can also have
 
 [code]Require not bad_user[/code]
 
 if you still have a question please ask again
 | 
 |  |  
| Back to top |  |  
 
 | 
 |  | 
 |  |