Jump to content

Recommended Posts

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

 

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.