{"id":260,"date":"2013-06-24T20:31:00","date_gmt":"2013-06-24T20:31:00","guid":{"rendered":"http:\/\/84@jodohost.com\/\/blog\/"},"modified":"2013-06-24T20:31:00","modified_gmt":"2013-06-24T20:31:00","slug":"the-apache-mod_rewrite-best-seo-practices-tool","status":"publish","type":"post","link":"http:\/\/www.jodohost.com\/blog\/index.php\/2013\/06\/24\/the-apache-mod_rewrite-best-seo-practices-tool\/","title":{"rendered":"The Apache &quot;mod_rewrite&quot;: Best SEO Practices Tool"},"content":{"rendered":"<p>The Apache web server has a module called mod_rewrite which allows a URL in the client&#8217;s browser to redirect to another URL, all by manipulation on the server side and without any change in the client&#8217;s submitted URL.<\/p>\n<p>mod_rewrite helps to create &#8220;clean URLs&#8221; and this module is commonly used by many CMS and blogging platforms like WordPress and Drupal. <\/p>\n<p>To check if mod_rewrite has been enabled or not, just create an empty (xyz).php file anywhere on your web root and write the following line:<\/p>\n<p>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0<!--?php phpinfo(); ?--><\/p>\n<p>Open this file in any web browser using http:\/\/domain\/xyz.php and check out apache2handler. mod_rewrite would appear there if it is enabled.<\/p>\n<p>\u00a0\u00a0\u00a0 Consider a website which takes input in the form http:\/\/abc.com\/name.php?q=sachin. This looks ugly and is not search engine friendly. We would like to have something like http:\/\/abc.com\/name\/sachin. This would be nice and easy to remember. For this let us create a rule for mod_rewrite.<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0RewriteEngine On<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0RewriteRule ^name\/(\\w+)\/?$ name.php?id=$1<\/p>\n<p>The Rewrite engine is going to examine the incoming URL requests and convert the friendly URL into the URL understandable by the server!!<\/p>\n<p> ]]><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Apache web server has a module called mod_rewrite which allows a URL in the client&#8217;s browser to redirect to another URL, all by manipulation on the server side and without any change in the client&#8217;s submitted URL. mod_rewrite helps to create &#8220;clean URLs&#8221; and this module is commonly used by many CMS and blogging [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/260"}],"collection":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=260"}],"version-history":[{"count":0,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/260\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jodohost.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}