Bonjour,
j'aurais besoin d'avoir un comportement bien précis en fonction d'une url correspondant à un sous domaine.
En gros, j'ai mes règles basées sur www. mais j'en voudrais une pour cv.
Je pensais à ça :
RewriteEngine On #### # Redirection sur le www : # RewriteCond %{HTTP_HOST} !^www.llaumgui.com$ RewriteCond %{HTTP_HOST} !^cv.llaumgui.com$ RewriteRule ^(.*) [url="http://www.llaumgui.com/$1"]http://www.llaumgui.com/$1[/url] [QSA,L,R=301] #### # Vielles URL DC1 : # Vieux RSS : Redirect permanent /rss.php [url="http://www.llaumgui.com/feed/rss2"]http://www.llaumgui.com/feed/rss2[/url] Redirect permanent /atom.php [url="http://www.llaumgui.com/feed/atom"]http://www.llaumgui.com/feed/atom[/url] # Vielle TOC : RedirectMatch permanent /index.php/toc(.*)$ [url="http://www.llaumgui.com/archive"]http://www.llaumgui.com/archive[/url] # Vieux billets : RewriteCond %{HTTP_HOST} !^cv.llaumgui.com RewriteCond %{REQUEST_URI} !^/index\.php\/?$ RewriteCond %{REQUEST_URI} !^/index\.php/archive RewriteCond %{REQUEST_URI} !^/index\.php/category RewriteCond %{REQUEST_URI} !^/index\.php/curriculum RewriteCond %{REQUEST_URI} !^/index\.php/dcscrobbler RewriteCond %{REQUEST_URI} !^/index\.php/feed RewriteCond %{REQUEST_URI} !^/index\.php/page RewriteCond %{REQUEST_URI} !^/index\.php/post RewriteCond %{REQUEST_URI} !^/index\.php/tag RewriteCond %{REQUEST_URI} !^/index\.php/tags RewriteRule index.php/(.*) [url="http://www.llaumgui.com/post/$1"]http://www.llaumgui.com/post/$1[/url] [QSA,L,R=301] #### # Disparition du index.php # AddType x-mapp-php5 .php RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php/$1 RewriteCond %{HTTP_HOST} cv.llaumgui.com RewriteRule (.*) index.php/curriculum/ [L] RewriteRule ^index.php$ index.php/ DirectoryIndex index.php/ #### # Erreur : # #ErrorDocument 404 /
D'avance, merci :-)