{"id":27965,"date":"2026-03-04T19:39:39","date_gmt":"2026-03-04T17:39:39","guid":{"rendered":"https:\/\/www.cheops-technology.ch\/docs\/how-to-redirect-via-htaccess-in-a-subfolder\/"},"modified":"2026-03-05T12:58:47","modified_gmt":"2026-03-05T10:58:47","password":"","slug":"how-to-redirect-via-htaccess-in-a-subfolder","status":"publish","type":"docs","link":"https:\/\/www.cheops-technology.ch\/en\/docs\/how-to-redirect-via-htaccess-in-a-subfolder\/","title":{"rendered":"How to redirect via .htaccess in a subfolder"},"content":{"rendered":"\n<p>htaccess redirection in a subfolder :<\/p>\n\n<p>RewriteEngine On<\/p>\n\n<p>Options +FollowSymlinks<\/p>\n\n<p>RewriteCond %{HTTP_HOST} ^exemple\\.com$ [OR]<\/p>\n\n<p>RewriteCond %{HTTP_HOST} ^www\\.example.com$<\/p>\n\n<p>RewriteCond %{REQUEST_URI}!subfolder\/<\/p>\n\n<p>RewriteRule ^(.*)$ subfolder\/$1 [L]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>htaccess redirection in a subfolder : RewriteEngine On Options +FollowSymlinks RewriteCond %{HTTP_HOST} ^exemple\\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\\.example.com$ RewriteCond %{REQUEST_URI}!subfolder\/ RewriteRule ^(.*)$ subfolder\/$1 [L]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[136],"doc_tag":[],"class_list":["post-27965","docs","type-docs","status-publish","hentry","doc_category-web-hosting"],"year_month":"2026-05","word_count":28,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Support","author_nicename":"support","author_url":"https:\/\/www.cheops-technology.ch\/en\/author\/support\/"},"doc_category_info":[{"term_name":"Web hosting","term_url":"https:\/\/www.cheops-technology.ch\/en\/docs-category\/web-hosting\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/docs\/27965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/comments?post=27965"}],"version-history":[{"count":1,"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/docs\/27965\/revisions"}],"predecessor-version":[{"id":27967,"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/docs\/27965\/revisions\/27967"}],"wp:attachment":[{"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/media?parent=27965"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/doc_category?post=27965"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.cheops-technology.ch\/en\/wp-json\/wp\/v2\/doc_tag?post=27965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}