infernaz Posted September 10, 2010 Posted September 10, 2010 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'
Byron Posted September 10, 2010 Posted September 10, 2010 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/
infernaz Posted September 10, 2010 Author Posted September 10, 2010 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now