Geo Ip Rewrite For Files

#1
Hello,
i need to do some thing for a file

i want to make accessible file for 1 country ! Like Fr

now im using this code

Code:
GeoIPEnable On

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !FR

RewriteRule test.js [F,L]

but it makes it 404 and make problem to load the file ( its canceled request and make it 2 request )
is there any Rewrite for showing empty file to other countries but show correct code and file for selected country

** i have lite speed cache on host **
 
#5
im not admin of server im using the shared host !
i think its active becuse this code is working

GeoIPEnable On

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !FR

RewriteRule test.js [F,L]



but it make it 404 for other countries , but i need to make it empty file for other or something like that.

also if it need to be setup in webadmin , what i should tell them to do ? or is there any rule to test its setuped befor i tell them...
 
#10
please try:

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !FR
RewriteRule test.js - [F,L,S]
RewriteRule test.js empty.js

create an empty.js file on the server.
Thanks, it make test.js in FR or with out FR ip empty (its not working)




Try this:

Code:
<IfModule mod_geoip.c>
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} !^(FR)$
RewriteRule (test).js$ - [F,L]
</IfModule>
Thanks. but it make the file 403 and was like my own rule in first of topic
 
Top