Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Apache Virtual Host redirect from subdomain to subdirectory

Without access to cpanel and only .htacess and FTP access, how can I create a hosting site that when the user tries to access for example sub.domain.com it redirects to domain.com/sub automatically. the reason is to eliminate having to create subdomains by hand. Is this possible?

share|improve this question

marked as duplicate by Shane Madden, mulaz, Magellan, Ward, John Gardeniers Oct 18 '12 at 9:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 3 down vote accepted

Check htaccess-rewrite-to-subfolders-for-subdomains-and-the-main-domain. Should be able to work in your .htaccess file.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.