jobo: Htaccess und subdomains

Beitrag lesen

Hallo,

Natürlich geht das. Du musst nur die richtige Syntax finden. Leite doch erstmal die Subdomain positiv um. Und dann die Negation davon. Er meinte vermutlich deine domain.de und domain2.de. Es heißt example.com ...; wobei es domain2.de garnicht zu geben scheint.

RewriteCond %{HTTP_HOST} !www.yournewsdomain.com$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).yournewsdomain.com [NC]
RewriteRule (.*) index.php?topic=%2 [NC,QSA]

First 2 lines add the condition for the actual rewrite rule (line 3) to come in place.

First line will add an exception for the subdomain www. Add here a similar line for each subdomain that you don't want to follow the same rule.

http://www.reconn.us/content/view/46/67/

Gruß

jobo