.htaccess - Can I load htaccess settings based on ip? -


I have this in my HTACAC file for my GT site:

  option + For Multivizzes FollowSymLinks RewriteBase / RewriteBase # 301, redirect to using www RewriteCond% {HTTP_HOST} for all pages! ^ (Www. $ $) [NC] rewrite rules http: //www.% {HTTP_HOST}% {REQUEST_URI} [L, R = 301]   

I'm testing it on the server, so I have to change it manually:

  #options + multiplayer follow-up limit permits revive on rewritebase / # 301 www #RewriteCond% {HTTP_HOST}! Redirect all pages to use! ^ (Www. $$) [NC] #Reverect Rule ^ http: //www.% {HTTP_HOST}% {REQUEST_URI} [L, R = 301]   

What is HTACAC Is there an automatic way through which I can turn things on and off based on current server IP? My test server 127.0.0.1

OK You can use Reovat states based on % {REMOTE_ADDR} Can}} :

  # 301 www rewritecond% {REMOTE_ADDR}! Redirect redirect for all pages to use = 127.0.0.1% {HTTP_HOST}! ^ (www \. $$) [NC] Revised Rule ^ http: //www.% {HTTP_HOST}% {REQUEST_URI} [L, R = 301]   

This only redirects If the IP is not equal to 127.0.0.1

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -