apache - IP range in .htaccess file mod_rewite -


i have , it's not working:

rewriteengine on rewritebase /igra/ rewritecond %{http_user_agent} (safa|navigator) [nc] rewritecond %{remote_addr} (78\.30\.128\.0/78\.30\.159\.255) rewriterule ^((?!templ/).*)$ templ/$1 [l,nc] 

i belive somwhere below problem - somewhere ip range / ip range or what?0/78 part

rewritecond %{remote_addr} (78\.30\.128\.0/78\.30\.159\.255) 

you cannot use ip address range in mod_rewrite can use multiple ip starting blocks using regex or (pipe) this:

rewritecond %{remote_addr} ^78\.30\.(128|129)\. 

or this:

rewritecond %{remote_addr} ^78\.30\.12[89]\. 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -