How do I create redirect to subdomain

New to apache

From scrolling the web I redirected all to  However, now I need to, in addition, redirect http://www.domain/subdomain/ to

is this something I can do with .htaccess?
Charles BaldoSoftware DeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

ncooConnect With a Mentor Commented:
Create an htaccess file:


Add the following and upload it to

redirect 301 /subdomain

Open in new window

Charles BaldoSoftware DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.