PDA

View Full Version : Change location of main domain



clippis
01-04-2007, 03:33 AM
You know that main domain is located above all add-on domains i.e. in public_html directory.

How to move in public_html/main_domain.com directory in order to handle it exactly as all other add-on domains ?

Thanks

RDM
01-04-2007, 11:08 AM
put this in your .htaccess file



RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?MAIN_DOMAIN.com$
RewriteCond %{REQUEST_URI} !^/MAIN_DOMAIN_FOLDER/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /MAIN_DOMAIN_FOLDER/$1
RewriteCond %{HTTP_HOST} ^(www.)?MAIN_DOMAIN.com$
RewriteRule ^(/)?$ MAIN_DOMAIN_FOLDER/index.html [L]

ronrizzo
01-04-2007, 04:05 PM
I dont know enough about htaccess files to understand what the code above means so could you please fill in the following so I can copy it. Please dont post it here PM me because I am not sure if it is a security risk but am going to assume it is. I will PM you the domain name and the folder I want put the domain files in.

clippis
01-05-2007, 07:21 AM
put this in your .htaccess file



RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?MAIN_DOMAIN.com$
RewriteCond %{REQUEST_URI} !^/MAIN_DOMAIN_FOLDER/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /MAIN_DOMAIN_FOLDER/$1
RewriteCond %{HTTP_HOST} ^(www.)?MAIN_DOMAIN.com$
RewriteRule ^(/)?$ MAIN_DOMAIN_FOLDER/index.html [L]

thanks, i don't understand some conditions, but it works !