1
Please, I have a wildcard entry in my domain, that is, qualquerNome.meudomino.com.br redirects to mydomain.com.br. I need to configure my htaccess to redirect all entries to a file, in which, according to the subdomain, I redirect properly. How would this htaccess file look, considering that the file that will evaluate this subdomain will receive as follows: .php file? Domain=Xxx. Where XXX is the requested subdomain. I made the second rule below, which works at first, but I cannot standardize the behavior of the rule when it is requested with "www" and without "www".
RewriteCond %{HTTP_HOST} ^(.*)\.dominio\.com\.br
RewriteRule (.*) http://dominio.com.br/domain.php?id=%1 [R=301,L]
Thank you very much for anticipation.
Possible solution in .htaccess wildcard subdomain pointing to directory + hash
– Bacco
Hello @Bacco, I edited the question, because I still have the problem of "www". that when used or does not have different effects
– Chris M. Fritsche