Jump to content

Recommended Posts

Posted

Hello!

 

I'm currently modifying my system to be multidomain and i popped into a problem.

 

My file system looks like this:

 

public_html
|- mindleak.co.cc
|- volosas.co.cc

 

Now i want to reach 'public_html/mindleak.co.cc' with address 'mindleak.co.cc' and 'public_html/volosas.co.cc' with address 'volosas.co.cc'.

The problem is that 'volosas.co.cc' is my main domain and I don't have a clue how i could point it not to 'public_html', but to 'public_html/volosas.co.cc'.

 

What is more i would like to reach 'public_html/mindleak.co.cc' with address 'mindleak.volosas.co.cc'. However I think i have done that by making an addon domain (still queued).

 

So the question would be how can i make address 'volosas.co.cc' to point to 'public_html/volosas.co.cc'

 

Posted

Are you familiar with htaccess? Do a google search for htaccess rewrite main domain to folder. May look something like this in your root .htaccess file:

 

RewriteEngine On
RewriteRule ^/?$ /volosas.co.cc/

 

Posted

Never thought about that.

 

I ended up using this script:

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC]
RewriteCond %{REQUEST_URI} !^/sub\-folder/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /sub-folder/$1
RewriteCond %{HTTP_HOST} ^(www.)?main\-domain.com$ [NC]
RewriteRule ^(/)?$ sub-folder/index.php [L]

 

Thanks

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.   Paste as plain text instead

  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...