Redirection sous domaine

Fermé
Jkai - 12 sept. 2008 à 11:59
divland Messages postés 194 Date d'inscription dimanche 22 juin 2008 Statut Membre Dernière intervention 4 septembre 2009 - 13 sept. 2008 à 18:00
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 737 Date d'inscription dimanche 8 juin 2008 Statut Membre Dernière intervention 20 avril 2017 192
12 sept. 2008 à 12:14
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
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 194 Date d'inscription dimanche 22 juin 2008 Statut Membre Dernière intervention 4 septembre 2009 13
13 sept. 2008 à 18:00
bonjour,
vous pouviez aussi le faire dans un htaccess avec une redirection du style :
Redirect Permanent X Y
0