How can I change my primary Domain root folder from /public_html to /public_html/my_folder ?
The website I wish to display is in my_folder but www.mydomain.com shows the default webpage from the /public_html folder.
How can I change my primary Domain root folder from /public_html to /public_html/my_folder ?
The website I wish to display is in my_folder but www.mydomain.com shows the default webpage from the /public_html folder.
Edit and add this to your .htaccess file
Code:RewriteEngine on RewriteCond %{HTTP_HOST} ^(www.)?DOMAINNAME.com$ RewriteCond %{REQUEST_URI} !^/my_folder/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /my_folder/$1 RewriteCond %{HTTP_HOST} ^(www.)?DOMAINNAME.com$ RewriteRule ^(/)?$ my_folder/index.php [L]
Sign Up Now!
Unlimited Storage, Unlimited Transfer, Host Unlimited domain names, 1 Free Domain Name
BlueHost Features | BlueHost Help Desk | Become a BlueHost Affiliate | BlueHost CEO Blog
(888) 401-4678 | Create a support ticket
[QUOTE=areidmtm;38833]Edit and add this to your .htaccess file
Where is my .htaccess file?![]()
Charles Gan
Bluehost Reviews : Bluehost reviews hosted at bluehost
Bluehost Speed Test : bluehost hosting speed Test!
Bluehost Uptime : Bluehost uptime monthly reports
[QUOTE=yachthub;38846] Open a text editor (like Wordpad or one of the thousand free alternative ones like HTML Kit ) and paste areidmtm's code in there. Save the file as .htaccess and upload it to your root directory/public html.
Cheap web hosting review directory listing a
Hostmonster review and a Bluehost review - CPU, support, plans, speed test, uptime
Thanks for your help guys, got it!!![]()
When I uploaded .htaccess I couldn't see it, I guess the "." means hidden?
I uploaded without the dot and then renamed it which seems to have worked.
How do I see .htaccess if I want to edit it?, or do I just upload another one?
In which application can't you see it? Perhaps there's an option to make such files visible?
If you keep a copy of your web-site on your PC it doesn't actually matter whether you can see your .htaccess files on the server, just upload a revised copy. Alternatively you can edit your .htaccess files on the server in CPanel's File Manager.
I was using legacy file manager as File Manager seemed to be causing problems on my machine.
Using File Manager with the Show Hidden Files option selected I can see it.
Thanks.
I've been searching for days! This solution worked perfectly, I had to register to post and you have no idea how much time you've saved me Areidmtm, thanks!!
Hi All I have a simula problem.
I often edit/modify sites in a folder on my own server before uploading things onto other domains.
I have been experiencing problems as lots of the sites have links to css files using root directory links...
e.g.
<link href="/css/main.css" rel="stylesheet" type="text/css" />
But the files are in the subfolder
/websites/wings/
And that links points at the root
/
I cant change the links as the sites have to be put back on the server at a later date.
Is their a way i can use .htaccess to change the root location for the files?
So that /websites/wings/index.php root links will be pulled from /websites/wings/...
Thanks Matt