Bonjour,
Je cherche a creer des faux sous domaines a l aide de l url rewriting.
je veux que http://sousdomaine.domain.ltd/* soit redirige sur prout.php?foo=sousdomaine
j ai trouve et adapte ca:
RewriteCond %{HTTP_HOST} !^www\.domaine\.com [NC]
RewriteCond %{HTTP_HOST} !^domaine\.com [NC]
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.domaine\.com(.+) prout.php?foo=$1
ca marche a peu pres...
si je tape http://toto.domaine.com/une_page_qui_existe.html ou http://toto.domaine.com/une_page_quie_n'existe_pas.html
ca marche, je vais bien sur prout.php?foo=toto
par contre si je fais http://toto.domaine.com ca va sur l'index...
je comprend pas pourquoi.
si quelqu un peut m aider
merci
Je cherche a creer des faux sous domaines a l aide de l url rewriting.
je veux que http://sousdomaine.domain.ltd/* soit redirige sur prout.php?foo=sousdomaine
j ai trouve et adapte ca:
RewriteCond %{HTTP_HOST} !^www\.domaine\.com [NC]
RewriteCond %{HTTP_HOST} !^domaine\.com [NC]
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^([^.]+)\.domaine\.com(.+) prout.php?foo=$1
ca marche a peu pres...
si je tape http://toto.domaine.com/une_page_qui_existe.html ou http://toto.domaine.com/une_page_quie_n'existe_pas.html
ca marche, je vais bien sur prout.php?foo=toto
par contre si je fais http://toto.domaine.com ca va sur l'index...
je comprend pas pourquoi.
si quelqu un peut m aider

merci
