.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
Post a Comment