Redirection sous domaine

Jkai -  
divland Messages postés 215 Statut Membre -
Bonjour,
J'ai un nom de domaine
machintrucbidule.fr
j'ai un sous domaine
unsousdomaine.machintrucbidule.fr
qui redirige vers :
machintrucbidule.fr/unsousdomaine

comment faire pour que dès qu'on tape :

machintrucbidule.fr/unsousdomaine on soit automatiquement redirigé vers unsousdomaine.machintrucbidule.fr
merci

3 réponses

taz067 Messages postés 746 Date d'inscription   Statut Membre Dernière intervention   193
 
hello il te suffit de cree une page html ou tu mets une redirection

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://ton truc machin chose">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans nom</title>
<style type="text/css">
<!--
body {
background-image:
}
-->
</style></head>

<body>
</body>
</html>
0
Jkai
 
merci mais en fait j'aurais dû préciser, je pensais surtout via apache.

finalement j'ai utilisé des conditions en php en fonction de $_SERVER, c'est pas ce que je voulais faire mais ça fonctionne :p
0
divland Messages postés 215 Statut Membre 13
 
bonjour,
vous pouviez aussi le faire dans un htaccess avec une redirection du style :
Redirect Permanent X Y
0