Hey, i have a little problem.. i set a subdomain well: subdomain.domain.ltd it's work fine, but the problem is when i put an .htaccess file inside with a rewrite rule, for example: RewriteEngine on makes this: domain.tld/path_to_subdomain -> Works well! subdomain.domain.tld -> .htaccess error!! Here was my config (added by ISPConfig): /etc/httpd/conf/sites-available/domain.ltd.vhost Code: RewriteEngine on RewriteCond %{HTTP_HOST} ^subdomain.domain.ltd [NC] RewriteRule ^/(.*)$ /var/www/clients/client0/web2/web/path_to_subdomain/$1 [L] /var/www/clients/client0/web2/web/path_to_subdomain/.htaccess Code: RewriteEngine on RewriteRule ^(.*)$ index.php [QSA,L] domain.tld/path_to_subdomain -> Works well! subdomain.domain.tld -> .htaccess error!! it's very rare, i don't know what to do.. i tried lot of things
The problem is that you use a rewrite rule to point the subdomain to a subdirectory and then use another rewrite rule in thet subdirectory. Instead of redirecting the subdoamin to a subdirectory, remove the subdomain and create a new website instead with "subdomain.domain.ltd" in the domain field.
mmmm here is my ugly solution: Code: RewriteEngine on RewriteCond %{HTTP_HOST} ^subdomain.domain.ltd [NC] RewriteRule ^/(.*)$ /var/www/clients/client0/web2/web/path_to_subdomain/index.php/$1 [L] Adding the index.php works fine