[URL rewriting] Avec sous-domaine : forcer la redirection sur /index.php
Bonjour à tous,
Cela fait maintenant quelques heures que je cherche sur divers sites et avec mes neurones mais en vain !
J'ai donc un site web et trois sous domaines : jdr.aratars.org, tolkien.aratars.org et forum.aratars.org
Lorsque je tape : aratars.org/jdr dans ma barre d'adresse, j'arrive bien sur "http://jdr.aratars.org/index.php"
De même pour Tolkien et forum. Néanmoins, si je tape "jdr.aratars.org" j'arrive cette fois ci sur "http://jdr.aratars.org/" mais plus de "index.php"
A la racine, j'ai le même souci...
Je n'arrive pas à forcer la mise en place du index.php dans l'url lors de l'arrivée sur le site. Mes maigres connaissances et mes tentatives m'ont permis seulement d'aboutir à des erreurs type "http://jdrindex.php.aratars.org/index.php" ou "http://www.aratars.org/jdrindex.php"...
Voici ci-dessous mon Htaccess actuel ! Si quelqu'un a une idée, je lui en serais reconnaissant à vie :D
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
| RewriteEngine On
RewriteCond %{HTTP_HOST} ^aratars.org$
RewriteRule ^(.*) http://www.aratars.org/$1 [QSA,L,R=301]
RewriteRule ^forums.* http://forum.aratars.org/index.php
RewriteRule ^mforum([0-9]*).* http://forum.aratars.org/mforum$1.php
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).* http://forum.aratars.org/viewforum$1-$2-$3.php
RewriteRule ^forum([0-9]*).* http://forum.aratars.org/forum$1.php
RewriteRule ^ptopic([0-9]*).* http://forum.aratars.org/ptopic$1.php
RewriteRule ^ntopic([0-9]*).* http://forum.aratars.org/ntopic$1.php
RewriteRule ^stopic([0-9]*)-([0-9]*).* http://forum.aratars.org/stopic$1-$2.php
RewriteRule ^utopic([0-9]*)-([0-9]*).* http://forum.aratars.org/utopic$1-$2.php
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* http://forum.aratars.org/ftopic$1-$2-$3-$4.php
RewriteRule ^ftopic([0-9]*)-([0-9]*).* http://forum.aratars.org/ftopic$1-$2.php
RewriteRule ^ftopic([0-9]*).* http://forum.aratars.org/ftopic$1.php
RewriteRule ^ftopic([0-9]*).html http://forum.aratars.org/ftopic$1.html
RewriteRule ^setopic_([0-9]*)-([a-zA-Z0-9]*).* http://forum.aratars.org/setopic_$1-$2.php
RewriteRule ^sutra([0-9]*).* http://forum.aratars.org/sutra$1.php
RewriteRule ^newtopic([0-9]*).* http://forum.aratars.org/newtopic$1.php
RewriteCond %{HTTP_REFERER} !^http://www.aratars.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.aratars.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.feuxdelamour.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.feuxdelamour.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://jdr.aratars.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://jdr.aratars.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://tolkien.aratars.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://tolkien.aratars.org$ [NC]
RewriteCond %{HTTP_REFERER} !^http://forum.aratars.org/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://forum.aratars.org$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|zip|rar|wmv|swf|txt|pdf|JPG|JPEG|BMP|PNG|PDF|ZIP|RAR|WMV|EXE|exe|ttf|MP3|mp3)$ http://www.aratars.org/templates/Chronicles/images/logo_chronicles.gif [R,NC]
Options All -Indexes
RewriteCond %{HTTP_HOST} ^aratars.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.aratars.com$ [OR]
RewriteCond %{HTTP_HOST} ^aratars.biz$ [OR]
RewriteCond %{HTTP_HOST} ^www.aratars.biz$ [OR]
RewriteCond %{HTTP_HOST} ^aratars.info$ [OR]
RewriteCond %{HTTP_HOST} ^www.aratars.info$ [OR]
RewriteCond %{HTTP_HOST} ^aratars.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.aratars.net$ [OR]
RewriteCond %{HTTP_HOST} ^aratars.fr$ [OR]
RewriteCond %{HTTP_HOST} ^www.aratars.fr$
RewriteRule ^(.*)$ http://www.aratars.org/index.php [R=301,L]
Redirect permanent /forum http://forum.aratars.org/index.php
Redirect permanent /tolkien http://tolkien.aratars.org/index.php
Redirect permanent /jdr http://jdr.aratars.org/index.php
Redirect permanent /hebergement/denis http://denis.aratars.org
Redirect permanent /hebergement/normand http://normand.aratars.org
Redirect permanent http://www.aratars.org/ http://www.aratars.org/index.php |