{"id":10667,"date":"2026-03-11T05:06:09","date_gmt":"2026-03-11T05:06:09","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=10667"},"modified":"2026-03-11T05:38:13","modified_gmt":"2026-03-11T05:38:13","slug":"redirect-subfolder-using-htaccess","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/","title":{"rendered":"How to Redirect Subfolder Using .htaccess"},"content":{"rendered":"\n<p>Sometimes web administrators need to redirect one or more URLs in a subfolder to another subfolder in Apache server. This is commonly required if you are restructuring or moving your website. Although, you can do this on client side using JavaScript, it is better to permanently redirect URLs from server side using .htaccess file in Apache. In this article, we will learn how to redirect subfolder using .htaccess in Apache.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#Why_Redirect_Subfolder\" >Why Redirect Subfolder<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#How_to_Redirect_Subfolder_using_htaccess\" >How to Redirect Subfolder using htaccess<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#1_Using_Internal_Rewrite\" >1. Using Internal Rewrite<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#2_Using_External_Redirect\" >2. Using External Redirect<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#Variations\" >Variations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Redirect_Subfolder\"><\/span>Why Redirect Subfolder<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>1. <strong>Restructuring Site<\/strong> &#8211; Quite often, web admins need to restructure their website to make it easy to crawl for search engines, and help users browse content. While doing do, they will need to move one or more subfolders from one location to another. In such cases, you will need to redirect subfolder, to redirect users as well as search engines from old URLs to new URLs.<\/p>\n\n\n\n<p>2. <strong>Update Content<\/strong> &#8211; You will need to redirect all URLs in a subfolder if its content is outdated and you have created a new subfolder with fresh content.<\/p>\n\n\n\n<p>3. <strong>Subdomain to Subfolder<\/strong> &#8211; Often web admins redirect subdomain content (e.g. blog.site.com) to its own subfolder (e.g. site.com\/blog) to get better SEO authority. In such cases, you need to redirect to subfolder.<\/p>\n\n\n\n<p>4. <strong>Handle Deleted Subfolder<\/strong> &#8211; If you have completely deleted a subfolder for some reason or the other, then you will need to redirect its URLs to home page or elsewhere to avoid 404 page not found error.<\/p>\n\n\n\n<p>5. <strong>Canonicalization<\/strong> &#8211; Sometimes, URLs on a website work both with and without trailing slash. This can affect your SEO since search engines may see it as duplicate content. So you may need to redirect URLs with trailing slash to those without, or the other way round.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Redirect_Subfolder_using_htaccess\"><\/span>How to Redirect Subfolder using htaccess<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are a couple of common ways to redirect subfolder using .htaccess file in Apache server. Let us say you want to redirect all URLs from <em>https:\/\/mysite.com\/product<\/em> to <em>https:\/\/mysite.com\/new-product<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Using_Internal_Rewrite\"><\/span>1. Using Internal Rewrite<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this solution, we redirect URLs from one subfolder to another without changing browser URL in user&#8217;s browser. This is useful if you want to simply load content from another subfolder without letting the user know that they are being redirected. In such cases, open or create .htaccess file in your website&#8217;s root folder and add the following lines of code in it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine On<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteCond %{REQUEST_FILENAME} !-d<br>RewriteRule ^\/product\/(.*)$ new-product\/$1 [L]<\/pre>\n\n\n\n<p>Let us look at the above lines in detail. The first line checks if mod_rewrite is enabled. Next line checks if the requested URL is for a file. The third line checks if the requested URL is for a directory. The last line rewrites all URLs starting with \/product to subfolder starting with \/new-product. In it, $1 stands for the request URL string after \/product\/<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Using_External_Redirect\"><\/span>2. Using External Redirect<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this case, the browser will change URL to the new redirected URL. In this case, add the following lines to .htaccess file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine On<br>RewriteCond %{HTTP_POST} ^(www\\.)?mysite\\.com$ [NC]<br>RewriteCond %{REQUEST_URI} !^\/product(\/.*)?$<br>RewriteRule ^\/product\/(.*)$ new-product\/$1 [R=301,L]<\/pre>\n\n\n\n<p>In the above code, the first line checks if mod_rewrite is enabled. The next line checks if the domain is mysite.com. Next, line checks that the requested URL does not start with \/product. The last line rewrites all URLs starting with \/product to \/new-product.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Variations\"><\/span>Variations<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let us look at some of the variations of the above problem. If you need to redirect all pages of a specific subfolder \/product to the home page or root page then add the following rewrite rule.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine On<br>RewriteRule ^product(\/.*)?$ https:\/\/mysite.com [R=301,L]<\/pre>\n\n\n\n<p>You can also do the same thing using Redirect directive.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Redirect 301 \"\/new-product\" \"https:\/\/mysite.com\"<\/pre>\n\n\n\n<p>To rewrite all URLs of your site to a specific subfolder, without changing browser URL, add the following lines to your .htaccess file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine On<br>RewriteCond %{REQUEST_FILENAME} !-f<br>RewriteCond %{REQUEST_FILENAME} !-d<br>RewriteRule ^(.*)$ new-product\/$1 [L]<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt how to redirect subfolder using .htaccess in Apache server. We have described a couple of methods to do this &#8211; using internal rewrite and using external redirect. One method allows you to redirect without changing browser URL while the other allows you to redirect by changing browser URL. You can use any of these methods depending on your requirement.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/configure-apache-cache-ubuntu\/\">How to Configure Apache Cache in Ubuntu<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/increase-file-upload-size-apache\/\">How to Increase File Upload Size in Apache<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/disable-apache-cache\/\">How to Disable Cache in Apache Server<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.<\/p>\n","protected":false},"author":1,"featured_media":10683,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[631],"class_list":["post-10667","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","tag-redirect-subfolder"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Redirect Subfolder Using .htaccess - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Redirect Subfolder Using .htaccess - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2026-03-11T05:06:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-11T05:38:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"325\" \/>\n\t<meta property=\"og:image:height\" content=\"216\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\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:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Redirect Subfolder Using .htaccess\",\"datePublished\":\"2026-03-11T05:06:09+00:00\",\"dateModified\":\"2026-03-11T05:38:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/\"},\"wordCount\":698,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1\",\"keywords\":[\"redirect subfolder\"],\"articleSection\":[\"Apache\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/\",\"name\":\"How to Redirect Subfolder Using .htaccess - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1\",\"datePublished\":\"2026-03-11T05:06:09+00:00\",\"dateModified\":\"2026-03-11T05:38:13+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2026\\\/03\\\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1\",\"width\":325,\"height\":216,\"caption\":\"redirect subfolder using htaccess\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/redirect-subfolder-using-htaccess\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Redirect Subfolder Using .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Redirect Subfolder Using .htaccess - Ubiq BI","description":"Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.","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:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"How to Redirect Subfolder Using .htaccess - Ubiq BI","og_description":"Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.","og_url":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2026-03-11T05:06:09+00:00","article_modified_time":"2026-03-11T05:38:13+00:00","og_image":[{"width":325,"height":216,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg","type":"image\/jpeg"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Redirect Subfolder Using .htaccess","datePublished":"2026-03-11T05:06:09+00:00","dateModified":"2026-03-11T05:38:13+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/"},"wordCount":698,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1","keywords":["redirect subfolder"],"articleSection":["Apache"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/","url":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/","name":"How to Redirect Subfolder Using .htaccess - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1","datePublished":"2026-03-11T05:06:09+00:00","dateModified":"2026-03-11T05:38:13+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Sometimes website administrators need to redirect subfolders in Apache server. Here is how to redirect subfolder using .htaccess.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1","width":325,"height":216,"caption":"redirect subfolder using htaccess"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/redirect-subfolder-using-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Redirect Subfolder Using .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2026\/03\/redirect-subfolder-using-htaccess.jpg?fit=325%2C216&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2M3","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/10667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=10667"}],"version-history":[{"count":15,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/10667\/revisions"}],"predecessor-version":[{"id":10682,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/10667\/revisions\/10682"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/10683"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=10667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=10667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=10667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}