Jump to content

separate folders for main domain and www


Recommended Posts

Posted

Hello,

 

I would like to use separate folders for the main domain and subdomain "www". Is there a way to do it?

For instance, my domain name is lizardie.com, and the main domain folder is /home/kbat/public_html, and by default it is the same for www.lizardie.com. How do I change it to /home/kbat/public_html/www?

 

What I did up to now is created a redirection like this:

lizardie.com    /    http://lizardie.com/www    permanent   match_www

However, this also changes the address in the browser from www.lizardie.com to lizardie.com/www what I do not like.

 

Thank you,

 

Konstantin

 

Posted

It's all the same domain. www.lizardie.com is just a sub-domain of lizardie.com. If you want to redirct all requests to www than add this to your .htaccess file.

 

RewriteEngine on
RewriteCond %{HTTP_HOST} ^lizardie\.com [NC]
RewriteRule (.*) http://www.lizardie.com/$1 [R=301,L]

 

edit:

 

To answer your original question: no you can't have seperate folders for public_html and www. What you create in your public_html will also be in your www and vice versa.

 

 

 

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