Nick Tsitlakidis
Nick Tsitlakidis

Reputation: 2479

How to redirect a non-existing directory to a sub-domain

During the last 2 hours I'm trying to achieve the following with no success.

I have a domain (lets call it www.test.com) which is assigned to a specific folder in my host, for example : public_html/test.

Now, what I'm trying to do is, I want to redirect a specific url (www.test.com/move) to a subdomain that exists and is assigned to another folder inside the public_html.

I want this to happen only for the specific directory (move) which does not exist inside the test folder.

I guesss this can be done through .htaccesss but I fail miserably every time.

Any ideas on what I miss?

Upvotes: 0

Views: 283

Answers (1)

Mike Brant
Mike Brant

Reputation: 71404

This is really simple if you only want to do that specific URL.

RewriteEngine On
RewriteRule ^move$ http://subdomain.test.com [R=301,L]

Upvotes: 1

Related Questions