{"id":580,"date":"2018-07-19T08:27:29","date_gmt":"2018-07-19T08:27:29","guid":{"rendered":"http:\/\/www.codeinsightacademy.com\/blog\/?p=580"},"modified":"2018-07-19T08:27:29","modified_gmt":"2018-07-19T08:27:29","slug":"sample-htaccess-file","status":"publish","type":"post","link":"https:\/\/codeinsightacademy.com\/blog\/php\/sample-htaccess-file\/","title":{"rendered":"sample htaccess file"},"content":{"rendered":"<p>Sample htaccess file<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\">&lt;Limit GET POST&gt;\r\norder allow,deny\r\nSetEnvIf Remote_Addr ^10\\.87\\. ban\r\n#allow from 10.87.63.0\/8\r\nallow from env=allow\r\ndeny from env=ban\r\n&lt;\/Limit&gt;\r\n#https:\/\/www.countryipblocks.net\/block-specific-ips-from-your-allow-list-using-setenvif\r\n\r\n&lt;IfModule mod_rewrite.c&gt;\r\n  RewriteEngine on\r\n  RewriteRule ^test$ https:\/\/google.co.in\r\n  #RewriteRule .* https:\/\/google.co.in\r\n    #RewriteRule ^abc\/([a-z]*)\/([0-9]*)$ xyz.php?name=$1&amp;id=$2 [NC,L,QSA]\r\n    #RewriteCond %{HTTP_HOST} ^reporting.soc.saint-gobain.net [NC] \r\n    #RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https:\/\/domain.com\/$1 [R,L]\r\n&lt;\/IfModule&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sample htaccess file &lt;Limit GET POST&gt; order allow,deny SetEnvIf Remote_Addr ^10\\.87\\. ban #allow from 10.87.63.0\/8 allow from env=allow deny from env=ban &lt;\/Limit&gt; #https:\/\/www.countryipblocks.net\/block-specific-ips-from-your-allow-list-using-setenvif &lt;IfModule mod_rewrite.c&gt; RewriteEngine on RewriteRule ^test$ https:\/\/google.co.in #RewriteRule .* https:\/\/google.co.in #RewriteRule ^abc\/([a-z]*)\/([0-9]*)$ xyz.php?name=$1&amp;id=$2 [NC,L,QSA] #RewriteCond %{HTTP_HOST} ^reporting.soc.saint-gobain.net [NC] #RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https:\/\/domain.com\/$1 [R,L] &lt;\/IfModule&gt; &nbsp; &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/580"}],"collection":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/comments?post=580"}],"version-history":[{"count":1,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions"}],"predecessor-version":[{"id":581,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/posts\/580\/revisions\/581"}],"wp:attachment":[{"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/media?parent=580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/categories?post=580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeinsightacademy.com\/blog\/wp-json\/wp\/v2\/tags?post=580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}