{"id":34,"date":"2019-03-25T13:34:56","date_gmt":"2019-03-25T08:04:56","guid":{"rendered":"https:\/\/www.onlinenote.in\/htaccess\/?p=34"},"modified":"2019-05-02T10:51:14","modified_gmt":"2019-05-02T05:21:14","slug":"how-to-remove-html-php-etc-extension-from-url","status":"publish","type":"post","link":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/","title":{"rendered":"How to remove .html, .php, etc (extension) from URL?"},"content":{"rendered":"<p>To remove the .html extension from your urls, you can use the following code in root\/htaccess :<\/p>\n<pre class=\"lang:default decode:true\">RewriteEngine on\r\n\r\nRewriteCond %{THE_REQUEST} \/([^.]+)\\.html [NC]\r\nRewriteRule ^ \/%1 [NC,L,R]\r\nRewriteCond %{REQUEST_FILENAME}.html -f\r\nRewriteRule ^ %{REQUEST_URI}.html [NC,L]<\/pre>\n<p>NOTE: If you want to remove any other extension, for example to remove the .php extension, just replace the\u00a0<strong>html<\/strong>\u00a0everywhere with\u00a0<strong>php<\/strong>\u00a0in the code above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To remove the .html extension from your urls, you can use the following code in root\/htaccess : RewriteEngine on RewriteCond %{THE_REQUEST} \/([^.]+)\\.html [NC] RewriteRule ^ \/%1 [NC,L,R] RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^ %{REQUEST_URI}.html [NC,L] NOTE: If you want to remove any other extension, for example to remove the .php extension, just replace the\u00a0html\u00a0everywhere with\u00a0php\u00a0in the [&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":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to remove .html, .php, etc (extension) from URL? - htaccess<\/title>\n<meta name=\"description\" content=\"To remove the .html, .php, .asp, .htm, .jsp extension from your domain urls. If you want to remove any other extension, just replace the\u00a0html\u00a0everywhere in code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to remove .html, .php, etc (extension) from URL? - htaccess\" \/>\n<meta property=\"og:description\" content=\"To remove the .html, .php, .asp, .htm, .jsp extension from your domain urls. If you want to remove any other extension, just replace the\u00a0html\u00a0everywhere in code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/\" \/>\n<meta property=\"og:site_name\" content=\"htaccess\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T08:04:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-02T05:21:14+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/\",\"url\":\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/\",\"name\":\"How to remove .html, .php, etc (extension) from URL? - htaccess\",\"isPartOf\":{\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/#website\"},\"datePublished\":\"2019-03-25T08:04:56+00:00\",\"dateModified\":\"2019-05-02T05:21:14+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"To remove the .html, .php, .asp, .htm, .jsp extension from your domain urls. If you want to remove any other extension, just replace the\u00a0html\u00a0everywhere in code.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.onlinenote.in\/htaccess\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to remove .html, .php, etc (extension) from URL?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.onlinenote.in\/htaccess\/#website\",\"url\":\"https:\/\/www.onlinenote.in\/htaccess\/\",\"name\":\"htaccess\",\"description\":\"Code Snippets\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.onlinenote.in\/htaccess\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to remove .html, .php, etc (extension) from URL? - htaccess","description":"To remove the .html, .php, .asp, .htm, .jsp extension from your domain urls. If you want to remove any other extension, just replace the\u00a0html\u00a0everywhere in code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/","og_locale":"en_US","og_type":"article","og_title":"How to remove .html, .php, etc (extension) from URL? - htaccess","og_description":"To remove the .html, .php, .asp, .htm, .jsp extension from your domain urls. If you want to remove any other extension, just replace the\u00a0html\u00a0everywhere in code.","og_url":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/","og_site_name":"htaccess","article_published_time":"2019-03-25T08:04:56+00:00","article_modified_time":"2019-05-02T05:21:14+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/","url":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/","name":"How to remove .html, .php, etc (extension) from URL? - htaccess","isPartOf":{"@id":"https:\/\/www.onlinenote.in\/htaccess\/#website"},"datePublished":"2019-03-25T08:04:56+00:00","dateModified":"2019-05-02T05:21:14+00:00","author":{"@id":""},"description":"To remove the .html, .php, .asp, .htm, .jsp extension from your domain urls. If you want to remove any other extension, just replace the\u00a0html\u00a0everywhere in code.","breadcrumb":{"@id":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.onlinenote.in\/htaccess\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.onlinenote.in\/htaccess\/"},{"@type":"ListItem","position":2,"name":"How to remove .html, .php, etc (extension) from URL?"}]},{"@type":"WebSite","@id":"https:\/\/www.onlinenote.in\/htaccess\/#website","url":"https:\/\/www.onlinenote.in\/htaccess\/","name":"htaccess","description":"Code Snippets","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.onlinenote.in\/htaccess\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":""}]}},"_links":{"self":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":1,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":35,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/posts\/34\/revisions\/35"}],"wp:attachment":[{"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onlinenote.in\/htaccess\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}