Dear friends,
I have several addon domains under the root of my cpanel account (myweb.com) in /home/public_html/
public_html/addon1
public_html/addon2
public_html/subdomain1
etc..
I have created a directory /public_html/dir/ where I want to install the website for myweb.com, so I have added these lines to public_html/.htaccess
-------------
RewriteCond %{HTTP_HOST} ^(www\.)?myweb\.com$ [NC]
RewriteCond %{DOCUMENT_ROOT}/dir%{REQUEST_URI}/ -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]
RewriteCond %{HTTP_HOST} ^(www\.)?myweb\.com$ [NC]
RewriteRule ^(.*)$ /dir$1 [QSA,L]
---------------
It doesn't work properly. The homepage appear like "myweb.com/dir" or with two slashes.
My first question is, where is the error? I have made some mods but it is worse than the first time.
My second question is , would it be easier going to the httpd.conf and to modify the directory index of this virtual host? (I have shell access). I am afraid of breaking my cpanel account.
Thanks in advance.
Best regards
Víctor M.