ALL SYSTEMS OPERATIONALUPTIME 99.97%FLEET 18/18IN-MUM · US-LAX · EU-FSN EST. 2003 · +91 11 4998 4038

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 has to stay up.

A short conversation with an engineer. No quote-bot, no callback queue. We'll tell you honestly if we're not the right fit.