{"id":185,"date":"2006-11-28T10:51:15","date_gmt":"2006-11-28T10:51:15","guid":{"rendered":"https:\/\/bodhost.com\/kb\/\/web-hosting\/?p=185"},"modified":"2026-02-26T14:04:58","modified_gmt":"2026-02-26T14:04:58","slug":"what-is-htaccess","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/","title":{"rendered":"What Is .htaccess &#8211; Guide to File Configuration &#038; Uses"},"content":{"rendered":"\r\n<h2 data-start=\"475\" data-end=\"505\"><strong>Introduction to .htaccess<\/strong><\/h2>\r\n<p class=\"wp-block-paragraph\" data-start=\"507\" data-end=\"802\">.htaccess is a small text file that controls the configuration aspects of an Apache web server. Most people are familiar with the .htaccess file in relation to the ability to restrict access to a directory via password protection. However, .htaccess can do a lot more than password protection.<\/p>\r\n<p data-start=\"804\" data-end=\"1066\">The .htaccess file is an extremely powerful configuration tool that customizes how your website behaves and how your web server handles requests. You can create multiple .htaccess files for your website. Moreover, you can have one in every directory if needed.<\/p>\r\n<p data-start=\"1068\" data-end=\"1284\">However, .htaccess controls the directory it is placed in, as well as all the directories within that directory. Therefore, many people only use one .htaccess file \u2014 typically the one located in the root directory.<\/p>\r\n<p data-start=\"1286\" data-end=\"1414\">If you password-protect a directory, place a .htaccess file in that specific directory, assuming it isn\u2019t your root directory.<\/p>\r\n<h3 data-start=\"1421\" data-end=\"1459\"><strong>.htaccess Authentication Tutorial<\/strong><\/h3>\r\n<p data-start=\"1461\" data-end=\"1678\">Sometimes, it becomes necessary to make a specific directory of your website off-limits to the general public. Perhaps you have a members-only section or an administrative area that shouldn\u2019t be publicly accessible.<\/p>\r\n<p data-start=\"1680\" data-end=\"1919\">By using the .htaccess file with the .htpasswd file, you can easily restrict access. When visitors try to access that protected area, they are prompted for a username and password. Access is granted only after entering valid credentials.<\/p>\r\n<p data-start=\"1921\" data-end=\"2108\">To set up password protection, you\u2019ll need to telnet into your web server. Although telnet access isn\u2019t mandatory and there are alternatives, this tutorial focuses on the telnet method.<\/p>\r\n<h3 data-start=\"2110\" data-end=\"2138\"><strong>Example .htaccess File<\/strong><\/h3>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\">AuthUserFile \/<span class=\"hljs-type\">path<\/span>\/<span class=\"hljs-keyword\">to<\/span>\/your\/<span class=\"hljs-keyword\">password<\/span>\/file\/.htpasswd\r\n<br \/>AuthGroupFile \/dev\/<span class=\"hljs-keyword\">null<\/span>\r\n<br \/>AuthName \"Restricted Stuff\"\r\n<br \/>AuthType \"Basic\"\r\nrequire <span class=\"hljs-keyword\">valid<\/span>-<span class=\"hljs-keyword\">user<\/span>\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"2288\" data-end=\"2447\">The .htaccess file affects the directory it resides in and overrides the pre-configured server settings. Additionally, it impacts all subfolders recursively.<\/p>\r\n<p data-start=\"2449\" data-end=\"2665\">For example, if you password-protect a folder at http:\/\/www.website.com\/restricted\/ by placing this .htaccess file there, not only the restricted folder but also all subfolders within it will be password-protected.<\/p>\r\n<p data-start=\"2667\" data-end=\"2942\">The first line (AuthUserFile) specifies the path where the server looks for the password file. Adjust <code data-start=\"2769\" data-end=\"2780\">\/path\/to\/<\/code> accordingly. Keep the file name <code data-start=\"2813\" data-end=\"2824\">.htpasswd<\/code>. The next line (AuthGroupFile) defines access groups. Setting it to <code data-start=\"2893\" data-end=\"2904\">\/dev\/null<\/code> means there are no specific groups.<\/p>\r\n<p data-start=\"2944\" data-end=\"3095\">The AuthName line allows you to display a message describing the login area. Finally, <code data-start=\"3030\" data-end=\"3050\">require valid-user<\/code> ensures only authorized users gain access.<\/p>\r\n<h3 data-start=\"3102\" data-end=\"3134\"><strong>Creating the .htpasswd File<\/strong><\/h3>\r\n<p data-start=\"3136\" data-end=\"3317\">The .htpasswd file contains the usernames and passwords that can access your protected directory. Log in via telnet and navigate to the directory where your password file resides.<\/p>\r\n<p data-start=\"3319\" data-end=\"3358\">To create a new .htpasswd file, type:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\">htpasswd <span class=\"hljs-operator\">-<\/span><span class=\"hljs-built_in\">c<\/span> <br \/>.htpasswd johndoe\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"3399\" data-end=\"3516\">You\u2019ll be prompted to assign and confirm a password. To add more users, use the same command without the <code data-start=\"3504\" data-end=\"3508\">-c<\/code> flag.<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\"><span class=\"hljs-attribute\">htpasswd<\/span> <br \/>.htpasswd janedoe\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"3554\" data-end=\"3629\">Passwords are stored in encrypted form. A sample file may look like this:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\"><span class=\"hljs-section\">johndoe:rngxrrnRhGdFo<\/span>\r\n<br \/><span class=\"hljs-section\">janedoe:3lmIn9MHfWkKc<\/span><\/code><\/div>\r\n<div dir=\"ltr\">\u00a0<\/div>\r\n<\/div>\r\n<h3 data-start=\"3689\" data-end=\"3724\"><strong>.htaccess Redirection Tutorial<\/strong><\/h3>\r\n<p data-start=\"3726\" data-end=\"3915\">Sometimes, you must redirect users from one page to another. For instance, if a search engine lists a page that no longer exists, you can redirect visitors instead of showing a 404 error.<\/p>\r\n<p data-start=\"3917\" data-end=\"3956\">Add this line to your .htaccess file:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\">Redirect \/main.html <br \/>http:\/\/www.website.com\/index.html\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"4021\" data-end=\"4150\">This command redirects all requests for <code data-start=\"4061\" data-end=\"4072\">main.html<\/code> to <code data-start=\"4076\" data-end=\"4088\">index.html<\/code>. You can use this format to redirect multiple pages easily.<\/p>\r\n<h3 data-start=\"4157\" data-end=\"4201\"><strong>.htaccess and Customized Error Messages<\/strong><\/h3>\r\n<p data-start=\"4203\" data-end=\"4366\">Web servers usually generate plain error pages. However, creating custom error pages can greatly improve user experience and keep your website design consistent.<\/p>\r\n<p data-start=\"4368\" data-end=\"4403\">There are five major error types:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\"><span class=\"hljs-number\">400<\/span> Bad Request <br \/> \r\n<span class=\"hljs-number\">401<\/span> <span class=\"hljs-keyword\">Authorization<\/span> Required <br \/> \r\n<span class=\"hljs-number\">403<\/span> Forbidden <br \/> \r\n<span class=\"hljs-number\">404<\/span> File <span class=\"hljs-keyword\">Not<\/span> <span class=\"hljs-built_in\">Found<\/span> <br \/> \r\n<span class=\"hljs-number\">500<\/span> <span class=\"hljs-type\">Internal<\/span> <span class=\"hljs-keyword\">Server<\/span> Error  \r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"4526\" data-end=\"4679\">Design HTML pages for each error message, include helpful links, and store them in an <code data-start=\"4612\" data-end=\"4621\">\/errors<\/code> directory. Then, update your .htaccess file as follows:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\">ErrorDocument 400 \/errors\/400.html\r\n<br \/>ErrorDocument 401 \/errors\/401.html\r\n<br \/>ErrorDocument 403 \/errors\/403.html\r\n<br \/>ErrorDocument 404 \/errors\/404.html\r\n<br \/>ErrorDocument 500 \/errors\/500.html\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"4865\" data-end=\"4967\">Placing these lines in the root directory ensures that the entire site uses your custom error pages.<\/p>\r\n<h3 data-start=\"4974\" data-end=\"5015\"><strong>Preventing Access to .htaccess Files<\/strong><\/h3>\r\n<p data-start=\"5017\" data-end=\"5231\">Since .htaccess files usually reside in the root directory, it\u2019s important to prevent visitors from viewing them directly. Otherwise, they could see sensitive information like password file paths or access rules.<\/p>\r\n<p data-start=\"5233\" data-end=\"5279\">Add these lines to your root .htaccess file:<\/p>\r\n<p data-start=\"5233\" data-end=\"5279\"><code class=\"whitespace-pre!\"><span class=\"hljs-attribute\">order<\/span> allow,<br \/>deny  \r\ndeny <span class=\"hljs-selector-tag\">from<\/span> <span class=\"hljs-attribute\">all<\/span><\/code><\/p>\r\n<p data-start=\"5325\" data-end=\"5400\">These rules ensure visitors can\u2019t access any .htaccess file on your site.<\/p>\r\n<h3 data-start=\"5407\" data-end=\"5437\"><strong>Enabling Script Execution<\/strong><\/h3>\r\n<p data-start=\"5439\" data-end=\"5670\">Sometimes, scripts fail to run because of configuration restrictions. If your error log shows \u201cOptions ExecCGI is off on this directory,\u201d add the following line to your .htaccess file located in the same directory as your script:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\"><span class=\"hljs-built_in\">Options<\/span> <br \/><span class=\"hljs-variable\">ExecCGI<\/span>\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"5697\" data-end=\"5791\">This command grants permission for scripts (like <code data-start=\"5746\" data-end=\"5752\">.cgi<\/code> or <code data-start=\"5756\" data-end=\"5761\">.pl<\/code> files) to execute properly.<\/p>\r\n<h3 data-start=\"5798\" data-end=\"5860\"><strong>Restricting Access to a Directory (Specific IPs or Hosts)<\/strong><\/h3>\r\n<p data-start=\"5862\" data-end=\"5975\">You can restrict or allow access to specific IPs or hostnames using .htaccess. Create your file as shown below:<\/p>\r\n<div class=\"contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary\">\r\n<div class=\"overflow-y-auto p-4\" dir=\"ltr\"><code class=\"whitespace-pre!\">AuthUserFile <span class=\"hljs-operator\">\/<\/span>dev<span class=\"hljs-operator\">\/<\/span><span class=\"hljs-keyword\">null<\/span>\r\n<br \/>AuthGroupFile <span class=\"hljs-operator\">\/<\/span>dev<span class=\"hljs-operator\">\/<\/span><span class=\"hljs-keyword\">null<\/span>\r\n<br \/>AuthName AllowLocalAccess\r\n<br \/>AuthType Basic\r\n\r\n<span class=\"hljs-keyword\">order<\/span> deny,allow\r\ndeny <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-number\">0.0<\/span><span class=\"hljs-number\">.0<\/span><span class=\"hljs-number\">.0<\/span>\r\nallow <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-keyword\">all<\/span>\r\n<\/code><\/div>\r\n<\/div>\r\n<p data-start=\"6125\" data-end=\"6267\">Replace <code data-start=\"6133\" data-end=\"6142\">0.0.0.0<\/code> with the IP address or hostname you want to block. Doing this prevents that specific source from accessing your directory.<\/p>\r\n<h4 data-start=\"6274\" data-end=\"6293\"><strong>Final Thoughts<\/strong><\/h4>\r\n<p data-start=\"6295\" data-end=\"6533\">The .htaccess file is an essential tool for improving security, flexibility, and user experience on an Apache server. When used correctly, it can safeguard sensitive areas, customize error handling, and improve overall site performance.<\/p>\r\n<p data-start=\"6295\" data-end=\"6533\">Need help with your .htaccess file? Learn <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-find-the-missing-htaccess-file\/\" target=\"_blank\" rel=\"noopener\">how to find the Missing .htaccess file?<\/a> now.<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Introduction to .htaccess .htaccess is a small text file that controls the configuration aspects of an Apache web server. Most people are familiar with the .htaccess file in relation to&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[666],"tags":[1142,1141],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-general","tag-htaccess-file","tag-what-is-htaccess"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is an .htaccess File? A Simple Guide for Beginners<\/title>\n<meta name=\"description\" content=\"Learn what the .htaccess file does and how it controls redirects, security, &amp; performance on your website. Includes easy examples for beginners.\" \/>\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.bodhost.com\/kb\/what-is-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is an .htaccess File? A Simple Guide for Beginners\" \/>\n<meta property=\"og:description\" content=\"Learn what the .htaccess file does and how it controls redirects, security, &amp; performance on your website. Includes easy examples for beginners.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2006-11-28T10:51:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:04:58+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/c48414ad1536cea20e85282b0737a9f9\"},\"headline\":\"What Is .htaccess &#8211; Guide to File Configuration &#038; Uses\",\"datePublished\":\"2006-11-28T10:51:15+00:00\",\"dateModified\":\"2026-02-26T14:04:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/\"},\"wordCount\":790,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\".htaccess file\",\"What Is .HTACCESS?\"],\"articleSection\":[\"General Discussion\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/\",\"name\":\"What is an .htaccess File? A Simple Guide for Beginners\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2006-11-28T10:51:15+00:00\",\"dateModified\":\"2026-02-26T14:04:58+00:00\",\"description\":\"Learn what the .htaccess file does and how it controls redirects, security, & performance on your website. Includes easy examples for beginners.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/what-is-htaccess\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"General Discussion\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/general\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What Is .htaccess &#8211; Guide to File Configuration &#038; Uses\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/c48414ad1536cea20e85282b0737a9f9\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is an .htaccess File? A Simple Guide for Beginners","description":"Learn what the .htaccess file does and how it controls redirects, security, & performance on your website. Includes easy examples for beginners.","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.bodhost.com\/kb\/what-is-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"What is an .htaccess File? A Simple Guide for Beginners","og_description":"Learn what the .htaccess file does and how it controls redirects, security, & performance on your website. Includes easy examples for beginners.","og_url":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2006-11-28T10:51:15+00:00","article_modified_time":"2026-02-26T14:04:58+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/"},"author":{"name":"admin","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/c48414ad1536cea20e85282b0737a9f9"},"headline":"What Is .htaccess &#8211; Guide to File Configuration &#038; Uses","datePublished":"2006-11-28T10:51:15+00:00","dateModified":"2026-02-26T14:04:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/"},"wordCount":790,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":[".htaccess file","What Is .HTACCESS?"],"articleSection":["General Discussion"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/","url":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/","name":"What is an .htaccess File? A Simple Guide for Beginners","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2006-11-28T10:51:15+00:00","dateModified":"2026-02-26T14:04:58+00:00","description":"Learn what the .htaccess file does and how it controls redirects, security, & performance on your website. Includes easy examples for beginners.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/what-is-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"General Discussion","item":"https:\/\/www.bodhost.com\/kb\/category\/general\/"},{"@type":"ListItem","position":2,"name":"What Is .htaccess &#8211; Guide to File Configuration &#038; Uses"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/c48414ad1536cea20e85282b0737a9f9","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/51e53199212db3f59606920448d45a6ead224f904558e3ab9251d071a609b202?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/www.bodhost.com\/kb\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=185"}],"version-history":[{"count":7,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":14756,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/185\/revisions\/14756"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}