happypete Posted July 19, 2012 Share Posted July 19, 2012 Hi, The idea is a user signs up for a free trail on the main site and a mini site is created in Cpanel under a 'subdomain' and files copied across to create the mini site. When the trial is up the user can purchases a domain name for their site that will be an 'addon domain' via Cpanel. QUESTION: Is there a way this can be done with a subdirectory and not a subdomain using .htaccess? A subdirectory is easier to create with a PHP script and copy files across than a subdomain, and files can be reused between directories easier than between subdomains. If this can be done with .htaccess any pointers will be greatly appreciated. thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/265929-htaccess-parkeddomain-addon-domain-or-something-else/ Share on other sites More sharing options...
xyph Posted July 19, 2012 Share Posted July 19, 2012 You can't do this with pure .htaccess. In order for a subdomain to exist, you must specify in your DNS records. You could create a catch-all, and redirect to a sub-folder using that, but it won't 'look' like a subdomain to the end-user. Quote Link to comment https://forums.phpfreaks.com/topic/265929-htaccess-parkeddomain-addon-domain-or-something-else/#findComment-1362632 Share on other sites More sharing options...
happypete Posted July 19, 2012 Author Share Posted July 19, 2012 thanks. Quote Link to comment https://forums.phpfreaks.com/topic/265929-htaccess-parkeddomain-addon-domain-or-something-else/#findComment-1362636 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.