{"id":106,"date":"2019-03-25T13:27:35","date_gmt":"2019-03-25T07:57:35","guid":{"rendered":"https:\/\/www.onlinenote.in\/linux\/?p=106"},"modified":"2019-09-18T10:29:44","modified_gmt":"2019-09-18T04:59:44","slug":"how-to-remove-html-php-etc-extension-from-url","status":"publish","type":"post","link":"https:\/\/www.onlinenote.in\/linux\/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":[5],"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? - linux<\/title>\n<meta name=\"description\" content=\"To remove the .html, .php, etc (extension) extension from your urls using htaccess file in root folder. RewriteCond, RewriteEngine, RewriteRule are used.\" \/>\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\/linux\/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? - linux\" \/>\n<meta property=\"og:description\" content=\"To remove the .html, .php, etc (extension) extension from your urls using htaccess file in root folder. RewriteCond, RewriteEngine, RewriteRule are used.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/\" \/>\n<meta property=\"og:site_name\" content=\"linux\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T07:57:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-09-18T04:59:44+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\/linux\/how-to-remove-html-php-etc-extension-from-url\/\",\"url\":\"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/\",\"name\":\"How to remove .html, .php, etc (extension) from URL? - linux\",\"isPartOf\":{\"@id\":\"https:\/\/www.onlinenote.in\/linux\/#website\"},\"datePublished\":\"2019-03-25T07:57:35+00:00\",\"dateModified\":\"2019-09-18T04:59:44+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"To remove the .html, .php, etc (extension) extension from your urls using htaccess file in root folder. RewriteCond, RewriteEngine, RewriteRule are used.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.onlinenote.in\/linux\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to remove .html, .php, etc (extension) from URL?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.onlinenote.in\/linux\/#website\",\"url\":\"https:\/\/www.onlinenote.in\/linux\/\",\"name\":\"linux\",\"description\":\"Code Snippets\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.onlinenote.in\/linux\/?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? - linux","description":"To remove the .html, .php, etc (extension) extension from your urls using htaccess file in root folder. RewriteCond, RewriteEngine, RewriteRule are used.","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\/linux\/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? - linux","og_description":"To remove the .html, .php, etc (extension) extension from your urls using htaccess file in root folder. RewriteCond, RewriteEngine, RewriteRule are used.","og_url":"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/","og_site_name":"linux","article_published_time":"2019-03-25T07:57:35+00:00","article_modified_time":"2019-09-18T04:59:44+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/","url":"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/","name":"How to remove .html, .php, etc (extension) from URL? - linux","isPartOf":{"@id":"https:\/\/www.onlinenote.in\/linux\/#website"},"datePublished":"2019-03-25T07:57:35+00:00","dateModified":"2019-09-18T04:59:44+00:00","author":{"@id":""},"description":"To remove the .html, .php, etc (extension) extension from your urls using htaccess file in root folder. RewriteCond, RewriteEngine, RewriteRule are used.","breadcrumb":{"@id":"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.onlinenote.in\/linux\/how-to-remove-html-php-etc-extension-from-url\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.onlinenote.in\/linux\/"},{"@type":"ListItem","position":2,"name":"How to remove .html, .php, etc (extension) from URL?"}]},{"@type":"WebSite","@id":"https:\/\/www.onlinenote.in\/linux\/#website","url":"https:\/\/www.onlinenote.in\/linux\/","name":"linux","description":"Code Snippets","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.onlinenote.in\/linux\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":""}]}},"_links":{"self":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts\/106"}],"collection":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/comments?post=106"}],"version-history":[{"count":2,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts\/106\/revisions"}],"predecessor-version":[{"id":122,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/posts\/106\/revisions\/122"}],"wp:attachment":[{"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/media?parent=106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/categories?post=106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.onlinenote.in\/linux\/wp-json\/wp\/v2\/tags?post=106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}