Knowledgebase · .htaccess

How to redirect sub-directory to sub-domain using .htaccess?

Last updated 2021-02-28

In your domain root open the file .htaccess and enter before any code there

RewriteEngine on
RedirectMatch ^/directory/(.*)$ http://sub.domain.com/$;1

Incase of any issue, please raise a ticket

← All knowledgebase articles

Tell us what you need

Compare available plans or describe your workload so we can discuss a suitable starting point.