1
I don’t understand much of it. htaccess from apache, so I would like to ask colleagues if it is possible what I am going to explain, I have a domain: mycard.com.br and a domain test.mycard.com.br the domain folder is /home/mycard/html already the domain folder is /home/mycard/html/subdominios/test.
I wanted the user not to enter the Domain by the link http://mycard.com.br/subdominios/teste rather than by http://teste.mycard.com.br
If he types: http://mycard.com.br/subdominios or http://mycard.com.br/subdominios/teste
I could put a redirect file in those folders, but if it type http://mycard.com.br/subdominios/teste/index.php he accesses and that I didn’t want
He would be redirected to http://teste.mycard.com.br
It is possible to do this by . htaccess?
The ideal would be to create the subdominios on the same level as the html folder, but I don’t have access to the apache vhosts the Locaweb server creates the subdominios folder inside html
And where will you redirect if he type
http://mycard.com.br/subdominios
?– Mariano
http://mycard.com.br
– Marcelo
and if it type http://mycard.com.br/subdominios/test it must go to http://teste.mycard.com.br
– Marcelo
In addition, the subdomain
http://mycard.com.br/subdominios/foo
have to redirect tofoo.mycard.com.br
orteste.mycard.com.br
?– Mariano
This, if it is the subdominios folder it should go to the main site http://mycard.com.br and if it is a subfolder it should go to http://foo.mycard.com.br
– Marcelo