{"id":410,"date":"2021-03-20T23:47:53","date_gmt":"2021-03-20T23:47:53","guid":{"rendered":"https:\/\/hostandtech.com\/help\/?p=410"},"modified":"2021-11-14T18:31:11","modified_gmt":"2021-11-14T18:31:11","slug":"htaccess-file","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/","title":{"rendered":"Htaccess Tutorial"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"410\" class=\"elementor elementor-410\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ca08849 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ca08849\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-05e9697\" data-id=\"05e9697\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ded1e22 elementor-widget elementor-widget-heading\" data-id=\"ded1e22\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What is .htaccess ?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-dc06d80 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dc06d80\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4dc7aa9\" data-id=\"4dc7aa9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f7e7b8c elementor-widget elementor-widget-text-editor\" data-id=\"f7e7b8c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>It is a configuration file placed on directory level. And contain certain instructions. These instructions tell you how incoming traffic to your website will be handled.<br \/>For example, accessing a website, this can be for URL redirect. URL shortening or an access control. Moreover, There are a number of things that can be recorded in the .htaccess file.<\/p><p>In addition,You can create a it using any good text editor such as TextPad, UltraEdit, Microsoft WordPad and similar (you cannot use Microsoft NotePad).<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7c60f7e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7c60f7e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3f96a35\" data-id=\"3f96a35\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7b701c7 elementor-widget elementor-widget-heading\" data-id=\"7b701c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Examples for configurations you can add to the file:<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6b98687 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6b98687\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c96d5d4\" data-id=\"c96d5d4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3b3f053 elementor-widget elementor-widget-text-editor\" data-id=\"3b3f053\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Here are some codes to use for configuration . Add each code to the .htaccess .<\/p><ul><li>To <strong>remove PHP HTML Extensions From THE URL<\/strong> add the following code inside your .htaccess file:<\/li><\/ul><p><strong>For<span style=\"color: #000000;\"> <a style=\"color: #000000;\" href=\"https:\/\/hostandtech.com\/help\/tag\/cpanel-php\/\" target=\"_blank\" rel=\"noopener\">PHP<\/a><\/span><\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-66c38f2 elementor-widget elementor-widget-code-highlight\" data-id=\"66c38f2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php \">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp>RewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule ^([^\\.]+)$ $1.php [NC,L]<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-1025dca elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1025dca\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6d1598c\" data-id=\"6d1598c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8b78a5e elementor-widget elementor-widget-text-editor\" data-id=\"8b78a5e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>For HTML<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d079fc6 elementor-widget elementor-widget-code-highlight\" data-id=\"d079fc6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-html \">\n\t\t\t\t<code readonly=\"true\" class=\"language-html\">\n\t\t\t\t\t<xmp>RewriteCond %{REQUEST_FILENAME} !-f\nRewriteRule ^([^\\.]+)$ $1.html [NC,L]<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-97d40fc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"97d40fc\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-21cca3e\" data-id=\"21cca3e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7dd8f39 elementor-widget elementor-widget-text-editor\" data-id=\"7dd8f39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To <strong>remove Libwww-perl Access Test<\/strong> add this code inside the file:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c4e36e2 elementor-widget elementor-widget-code-highlight\" data-id=\"c4e36e2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php \">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp>RewriteCond %{HTTP_USER_AGENT} libwww-perl.*\nRewriteRule .* ? [F,L]<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-7bcac93 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7bcac93\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3c9cf68\" data-id=\"3c9cf68\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-d4f9382 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d4f9382\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5528aa3\" data-id=\"5528aa3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a7af16b elementor-widget elementor-widget-text-editor\" data-id=\"a7af16b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In order to improve the<strong> security of your site against some types of XSS (cross-site scripting) attacks<\/strong>, it is recommended that you add the following header to your site:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d25ec55 elementor-widget elementor-widget-code-highlight\" data-id=\"d25ec55\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp><IfModule mod_headers.c>\nHeader set X-XSS-Protection \"1; mode=block\"\n<\/IfModule><\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a3499d5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a3499d5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3f4b677\" data-id=\"3f4b677\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fd0288c elementor-widget elementor-widget-text-editor\" data-id=\"fd0288c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To <strong>add browser caching to your website<\/strong>, you have to set the date for when the cache expires:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-37a831e elementor-widget elementor-widget-code-highlight\" data-id=\"37a831e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php \">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp><IfModule mod_expires.c>\nExpiresActive On\nExpiresByType image\/jpg \"access plus 1 year\"\nExpiresByType image\/jpeg \"access plus 1 year\"\nExpiresByType image\/gif \"access plus 1 year\"\nExpiresByType image\/png \"access plus 1 year\"\nExpiresByType text\/css \"access plus 1 month\"\nExpiresByType application\/pdf \"access plus 1 month\"\nExpiresByType text\/x-javascript \"access plus 1 month\"\nExpiresByType application\/x-shockwave-flash \"access plus 1 month\"\nExpiresByType image\/x-icon \"access plus 1 year\"\nExpiresDefault \"access plus 2 days\"\n<\/IfModule><\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-59f9223 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"59f9223\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f60fa43\" data-id=\"f60fa43\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-de2f00e elementor-widget elementor-widget-text-editor\" data-id=\"de2f00e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To<b> display custom Error Message on common error number 404<\/b>, the simplest way to set the 404 error page is by setting directly the 404 error message in the .htaccess file itself:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6075ec9 elementor-widget elementor-widget-code-highlight\" data-id=\"6075ec9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php \">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp>ErrorDocument 404 \"SORRY Page not found\"\r\n\r\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e515624 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e515624\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6196d23\" data-id=\"6196d23\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-746a81e elementor-widget elementor-widget-text-editor\" data-id=\"746a81e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Or if you have custom Error 404 Like <strong>\u201c404.html\u201d<\/strong> Page you can simply add the following code to the .htaccess<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ed4db5d elementor-widget elementor-widget-code-highlight\" data-id=\"ed4db5d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-php \">\n\t\t\t\t<code readonly=\"true\" class=\"language-php\">\n\t\t\t\t\t<xmp>ErrorDocument 404 \/404.html\r\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-78cb5e5 elementor-widget elementor-widget-elementor-faq-schema\" data-id=\"78cb5e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-faq-schema.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t                                    <script type=\"application\/ld+json\">\n                    {\n                        \"@context\": \"https:\/\/schema.org\",\n                        \"@type\": \"FAQPage\",\n                        \"mainEntity\": [\n                         {\n                            \"@type\": \"Question\",\n                            \"name\": \"What Is Htaccess File?\",\n                            \"acceptedAnswer\": {\n                                \"@type\": \"Answer\",\n                                \"text\": \"&lt;p&gt;It is a configuration file placed on directory level. And contain certain instructions. These instructions tell you how incoming traffic to your website will be handled.&lt;br \/&gt;For example, accessing a website, this can be for URL redirect. URL shortening or an access control. Moreover, There are a number of things that can be recorded in the .htaccess file.&lt;\/p&gt;&lt;p&gt;In addition,You can create a it using any good text editor such as TextPad, UltraEdit, Microsoft WordPad and similar (you cannot use Microsoft NotePad)&lt;\/p&gt;\"\n                            }\n                                                    }\n                    ]\n                    }\n                <\/script>\n                    \t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>What is .htaccess ? It is a configuration file placed on directory level. And contain certain instructions. These instructions tell you how incoming traffic to your website will be handled. For example, accessing a website, this can be for URL redirect. URL shortening or an access control. Moreover, There are a number of things that [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":1165,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[247],"tags":[276,286],"class_list":["post-410","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","tag-apache","tag-htaccess"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Htaccess Definition And How to add Configuration for both PHP And HTML<\/title>\n<meta name=\"description\" content=\"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Htaccess Definition And How to add Configuration for both PHP And HTML\" \/>\n<meta property=\"og:description\" content=\"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\" \/>\n<meta property=\"og:site_name\" content=\"STS Host and Tech Knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-20T23:47:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-14T18:31:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"560\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Host&amp;Tech Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Htaccess Definition And How to add Configuration for both PHP And HTML\" \/>\n<meta name=\"twitter:description\" content=\"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Host&amp;Tech Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\"},\"author\":{\"name\":\"Host&amp;Tech Support\",\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83\"},\"headline\":\"Htaccess Tutorial\",\"datePublished\":\"2021-03-20T23:47:53+00:00\",\"dateModified\":\"2021-11-14T18:31:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\"},\"wordCount\":237,\"publisher\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#organization\"},\"image\":{\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png\",\"keywords\":[\"Apache\",\"Htaccess\"],\"articleSection\":[\"Apache\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\",\"url\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\",\"name\":\"Htaccess Definition And How to add Configuration for both PHP And HTML\",\"isPartOf\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png\",\"datePublished\":\"2021-03-20T23:47:53+00:00\",\"dateModified\":\"2021-11-14T18:31:11+00:00\",\"description\":\"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML\",\"breadcrumb\":{\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage\",\"url\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png\",\"contentUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png\",\"width\":960,\"height\":560,\"caption\":\"htaccess configuration\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hostandtech.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Htaccess Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hostandtech.com\/help\/#website\",\"url\":\"https:\/\/hostandtech.com\/help\/\",\"name\":\"STS Host and Tech Knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hostandtech.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hostandtech.com\/help\/#organization\",\"name\":\"STS Host and Tech Inc\",\"url\":\"https:\/\/hostandtech.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png\",\"contentUrl\":\"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png\",\"width\":630,\"height\":270,\"caption\":\"STS Host and Tech Inc\"},\"image\":{\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/stshostandtech\",\"https:\/\/x.com\/stshostandtech\",\"https:\/\/www.instagram.com\/stshostandtech\",\"https:\/\/www.youtube.com\/channel\/UCqJOPwWE0ILTeIScaND7enw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83\",\"name\":\"Host&amp;Tech Support\",\"sameAs\":[\"https:\/\/hostandtech.com\/help\"],\"url\":\"https:\/\/hostandtech.com\/help\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Htaccess Definition And How to add Configuration for both PHP And HTML","description":"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML","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:\/\/hostandtech.com\/help\/apache\/htaccess-file\/","og_locale":"en_US","og_type":"article","og_title":"Htaccess Definition And How to add Configuration for both PHP And HTML","og_description":"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML","og_url":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/","og_site_name":"STS Host and Tech Knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2021-03-20T23:47:53+00:00","article_modified_time":"2021-11-14T18:31:11+00:00","og_image":[{"width":960,"height":560,"url":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png","type":"image\/png"}],"author":"Host&amp;Tech Support","twitter_card":"summary_large_image","twitter_title":"Htaccess Definition And How to add Configuration for both PHP And HTML","twitter_description":"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML","twitter_image":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"Host&amp;Tech Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/"},"author":{"name":"Host&amp;Tech Support","@id":"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83"},"headline":"Htaccess Tutorial","datePublished":"2021-03-20T23:47:53+00:00","dateModified":"2021-11-14T18:31:11+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/"},"wordCount":237,"publisher":{"@id":"https:\/\/hostandtech.com\/help\/#organization"},"image":{"@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage"},"thumbnailUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png","keywords":["Apache","Htaccess"],"articleSection":["Apache"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/","url":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/","name":"Htaccess Definition And How to add Configuration for both PHP And HTML","isPartOf":{"@id":"https:\/\/hostandtech.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage"},"image":{"@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage"},"thumbnailUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png","datePublished":"2021-03-20T23:47:53+00:00","dateModified":"2021-11-14T18:31:11+00:00","description":"Htaccess is a configuration file placed on directory level and contain certain instructions, it used for configuration for both PHP And HTML","breadcrumb":{"@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#primaryimage","url":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png","contentUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2021\/03\/htaccess.png","width":960,"height":560,"caption":"htaccess configuration"},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/help\/apache\/htaccess-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/help\/"},{"@type":"ListItem","position":2,"name":"Htaccess Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/help\/#website","url":"https:\/\/hostandtech.com\/help\/","name":"STS Host and Tech Knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/help\/#organization","name":"STS Host and Tech Inc","url":"https:\/\/hostandtech.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png","contentUrl":"https:\/\/hostandtech.com\/help\/wp-content\/uploads\/2022\/02\/hostandtechlogo-1.png","width":630,"height":270,"caption":"STS Host and Tech Inc"},"image":{"@id":"https:\/\/hostandtech.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech","https:\/\/www.instagram.com\/stshostandtech","https:\/\/www.youtube.com\/channel\/UCqJOPwWE0ILTeIScaND7enw"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/help\/#\/schema\/person\/e047ccece500c5187cf74bddd8596e83","name":"Host&amp;Tech Support","sameAs":["https:\/\/hostandtech.com\/help"],"url":"https:\/\/hostandtech.com\/help\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts\/410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/comments?post=410"}],"version-history":[{"count":258,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts\/410\/revisions"}],"predecessor-version":[{"id":15588,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/posts\/410\/revisions\/15588"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/media\/1165"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/media?parent=410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/categories?post=410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/help\/wp-json\/wp\/v2\/tags?post=410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}