Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Mar 03, 2011 7:16 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Hello,

I'm trying to redirect users from some countries from the registration page to a specific page using mod_geoip, but something is wrong because is not redirecting:

Code:
  <IfModule mod_geoip.c>
    RewriteEngine on
    RewriteCond %{QUERY_STRING} ^app=core&module=global&section=register$
    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(A|B!C)$
    RewriteRule ^(.*)$ http://www.domain.com/page/manual-registration.html [L]
  </IfModule>


Can this be placed anywhere in vhosts or it need to be inside <Directory>?

Should I use FilesMatch instead (if it works ... I didn't test) or this does not work with query strings?

Code:
  <FilesMatch "^index.php?app=core&module=global&section=register$">
    RewriteEngine on
    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(A|B!C)$
    RewriteRule ^(.*)$ http://www.domain.com/page/manual-registration.html [L]
  </FilesMatch>


If you have better options I would like to know.
Thanks

Note: (A|B|C) are fake country codes, the GeoIP.dat is loaded and ON


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group