howto change home directory to other subdirectory?

Status
Not open for further replies.

softeye

New Member
Messages
13
Reaction score
0
Points
0
how do i change my home directory from /public_html to some other sub-directory directory.
like "/public_html/home_site/"
can anyone plz help?
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
This cannot be done through the control panel. Your primary domain will always point to the public_html directory. However, you can use an htaccess trick to use files from the home_site directory. Simply see the next post.

On a side note, domains you add through cPanel can point to public_html/home_site/.
 
Last edited:

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
This can be done using mod rewrite, Add these lines to your .htaccess file.

PHP:
RewriteEngine on
RewriteRule ^/$ /web/
 

softeye

New Member
Messages
13
Reaction score
0
Points
0
sorry my ignorance,
where do i found ".htaccess"?
do i need to create it and add to root directory?

thx
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
.htaccess is a hidden file. If you are using FTP, make sure that you have the option to see hidden files and folders on.
It should be in /home/bubynoa/public_html/
 
Status
Not open for further replies.
Top