Go Premium for a chance to win a PS4. Enter to Win


How do I create redirect to subdomain

Posted on 2010-09-16
Medium Priority
Last Modified: 2013-12-14
New to apache

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

is this something I can do with .htaccess?
Question by:Charles Baldo
LVL 15

Accepted Solution

ncoo earned 2000 total points
ID: 33695194
Create an htaccess file:


Add the following and upload it to domain.com/.htaccess

redirect 301 /subdomain http://subdomain.domain.com.

Open in new window


Author Closing Comment

by:Charles Baldo
ID: 33695294

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This program is used to assist in finding and resolving common problems with wireless connections.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question