Nom de domaine et virtual host
Bonjour à tous
je suis sur un nouveau projet, et dans ce nouveau projet, je souhaite que mes membres puisse avoir chacun un nom de domaine de type http://user.example.com
J'ai une base d'un htacces que j'ai trouver d'il y a quelques années mais qui me met un internal error.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteBase /sd/blog/
RewriteCond %{HTTP_HOST} !^<a href="http://www.domaine.com" target="_blank">www.domaine.com</a>
RewriteCond %{HTTP_HOST} !^.domaine.com
RewriteCond %{HTTP_HOST} ^([^.]+).domaine.com
RewriteRule ^$ /sd/blog/%1/ [L]
ErrorDocument 404 <a href="http://www.domaine.com/404.php" target="_blank">http://www.domaine.com/404.php</a>
RewriteRule ^article_([^.]+).html$ /sd/blog/%1/view.php?idarticle=$1 [L]
RewriteRule ^comment_([^.]+).html$ /%1/lire_comment.php?idarticle=$1 [L]
RewriteRule ^ajout_comment_([^.]+)_([^.]+).html$ /%1/ajout_comment.php?idarticle=$1&idblog=$2 [L]
RewriteRule ^comment_([^.]+)_([^.]+).html$ /%1/lire_comment.php?idarticle=$1&go=$2 [L]
RewriteRule ^photo_([^.]+).html$ /var/www/domaine.com/web/sd/blog/%1/photo.php?idarticle=$1 [L] |
ma question est je sais qu'il y a un virtual à creer/modifier, mais je ne vois pas ce que e dois faire pour que les sous domaine soit automatique
pouvez vous m'aider ?
cordialement