Hello,
I face the following issue, I have a hosted domain and my default root site directory is /public_html/ the problem is that I register several domains, with the site addon option from cpanel, which all of them have the root site directory in public_html, I want to change the site root directory of the primary domain to something like /public_html/primary, in this way all of my domains will have his own directory in /public_html.
I've managed to trick the apache server with a .htaccess rule to rewrite the url from www.primary.co/primary to www.primary.co, at this moment I've faced another issue with the cgi-bin engine, I've solved that also with +execCGI rule on the .htaccess, but now the cgi binary (cgiemail) is tricked by my rewrite rule and doesn't know to get his template file.
Does any one have a solution to change the default /public_html root site or how do i instruct the cgiemail to get the right path?
.htaccess in /public_html/
.htaccess in /public_html/primary/cgi-bin/
In conclusion my /public_html/ should contain the following directories:
primary (main domain)
secondary1 (addon domain1)
secondary2 (addon domain2)
secondaryn (addon domainn)
Regards,
Solved the issue, wrong sintax of the cgiemail:
wrong:
good:
Hope this info will help someone.
I face the following issue, I have a hosted domain and my default root site directory is /public_html/ the problem is that I register several domains, with the site addon option from cpanel, which all of them have the root site directory in public_html, I want to change the site root directory of the primary domain to something like /public_html/primary, in this way all of my domains will have his own directory in /public_html.
I've managed to trick the apache server with a .htaccess rule to rewrite the url from www.primary.co/primary to www.primary.co, at this moment I've faced another issue with the cgi-bin engine, I've solved that also with +execCGI rule on the .htaccess, but now the cgi binary (cgiemail) is tricked by my rewrite rule and doesn't know to get his template file.
Does any one have a solution to change the default /public_html root site or how do i instruct the cgiemail to get the right path?
.htaccess in /public_html/
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} primary.co
RewriteCond %{REQUEST_URI} !^/primary
RewriteRule ^(.*)$ primary/$1 [L]
Code:
Options +ExecCGI
SetHandler cgi-script
primary (main domain)
secondary1 (addon domain1)
secondary2 (addon domain2)
secondaryn (addon domainn)
Regards,
Solved the issue, wrong sintax of the cgiemail:
wrong:
Code:
cgi-bin/cgiemail/template
Code:
cgi-bin/cgiemail/primary/template
Last edited: