Yes absolutly it’s what I wrote in my previous post.
But my concern is that for the domain : carat-hosting.com I didn’t change anything and the .htacces with the overide php_value works fine. But on some others domain it doesn’t work fine.
The difference between a working domain and a non working one is that :
- my domain is on a dedicated IP
- my domain allow CGI
that’s all.
When you create a new siteworx account, siteworx create a domaine.com.conf file in /etc/httpd/conf.d/
Here is a copy of my .conf file which one .htaccess and php_value works fine:
My domain :
<VirtualHost 65.110.36.140:80>
SuexecUserGroup toto toto
DocumentRoot /home/toto/toto.com/html
ServerName toto.com
ServerAlias ftp.toto.com www.toto.com
ServerAdmin webmaster@toto.com
subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www.toto.com [NC]
RewriteCond %{HTTP_HOST} !^toto.com [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-]+).toto.com [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-]+).toto.com/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
end subdomain logic
ErrorLog /home/toto/var/toto.com/logs/error.log
CustomLog /home/toto/var/toto.com/logs/transfer.log combined
php_admin_flag engine On
cgi: 1
<Directory /home/toto/toto.com/html>
AllowOverride AuthConfig FileInfo Options Limit Indexes
Options +ExecCGI
</Directory>
ScriptAlias /cgi-bin/ /home/toto/toto.com/html/cgi-bin/
</VirtualHost>
For this one, to create a .htaccess in a subdirectory with this line "php_value register_globals on " works fine
Here is the original domain which the .htaccess with a php_value doesn’t work fine
<VirtualHost 65.110.36.145:80>
SuexecUserGroup titi titi
DocumentRoot /home/titi/titi.net/html
ServerName titi.net
ServerAlias www.titi.net ftp.titi.net mail.titi.net
ServerAdmin webmaster@titi.net
subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www.titi.net [NC]
RewriteCond %{HTTP_HOST} !^titi.net [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-]+).titi.net [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-]+).titi.net/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
end subdomain logic
ErrorLog /home/titi/var/titi.net/logs/error.log
CustomLog /home/titi/var/titi.net/logs/transfer.log combined
php_admin_flag engine On
cgi: 0
<Directory /home/titi/titi.net/html>
AllowOverride AuthConfig FileInfo Limit Indexes
</Directory>
Options -ExecCGI
</VirtualHost>
and here is the same domain with the update I made to have .htaccess / php_value working fine. I did add a “allowoverride all” for the subdirectory.
<VirtualHost 65.110.36.145:80>
SuexecUserGroup titi titi
DocumentRoot /home/titi/titi.net/html
ServerName titi.net
ServerAlias www.titi.net ftp.titi.net mail.titi.net
ServerAdmin webmaster@titi.net
subdomain logic
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTP_HOST} !^www.titi.net [NC]
RewriteCond %{HTTP_HOST} !^titi.net [NC]
RewriteCond %{HTTP_HOST} ^([A-Z0-9a-z-]+).titi.net [NC]
RewriteCond %{DOCUMENT_ROOT}/%1 -d
RewriteRule ^(.+) %{HTTP_HOST}/$1 [C]
RewriteRule ^([0-9A-Za-z-]+).titi.net/?(.*)$ %{DOCUMENT_ROOT}/$1/$2 [L]
end subdomain logic
ErrorLog /home/titi/var/titi.net/logs/error.log
CustomLog /home/titi/var/titi.net/logs/transfer.log combined
php_admin_flag engine On
cgi: 0
<Directory /home/titi/titi.net/html>
AllowOverride AuthConfig FileInfo Limit Indexes
</Directory>
<Directory /home/titi/titi.net/html/membres>
AllowOverride all
</Directory>
Options -ExecCGI
</VirtualHost>
Why it works fine with the toto.com domain and doesn’t work fine (without update) for the titi.com domain ?
As I already say I don’t like make change to the domain configuration file.
Thanks
Pascal