So you don't want to use the public_html directory for your website. You want to keep it clean and have all of your websites in their own folders. Simply put the following code in your root .htaccess and change your domain instead of domain.com:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteCond %{REQUEST_URI} !domain.com/
RewriteRule (.*) /folder-your-website-is-in/$1 [L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^domain.com$
RewriteCond %{REQUEST_URI} !domain.com/
RewriteRule (.*) /folder-your-website-is-in/$1 [L]
- 0 Users Found This Useful