Friday, September 18, 2009

mod_rewrite

SkyHi @ Friday, September 18, 2009
Apache 1

###rewrite www.... OR not www to new URL

RewriteEngine On
RewriteCond %{HTTP_HOST} www\.dramxcole\.com [NC]
RewriteRule . http://www.bcdramxcole.ca/coege/ [NC]

RewriteCond %{HTTP_HOST} dramxcole\.com [NC]
RewriteRule . http://www.bcdramxcole.ca/coege/ [NC]


RewriteCond %{HTTP_HOST} www\.residcatee\.ca [NC]
RewriteRule . http://www.bcdramxcole.ca/coege/ [NC]

RewriteCond %{HTTP_HOST} residcatee\.ca [NC]
RewriteRule . http://www.bcdramxcole.ca/coege/ [NC]



###rewrite different Domains to one specific URL



RewriteEngine on
RewriteCond %{HTTP_HOST} okokmedi\.ca [NC]
RewriteRule ^(.*)$ http://www.okokmedi.com$1 [L,R=301]
#
RewriteCond %{HTTP_HOST} stratabc\.ca [NC]
RewriteRule ^(.*)$ http://www.okokmedi.com$1 [L,R=301]
#
RewriteCond %{HTTP_HOST} okmedirecord\.ca [NC]
RewriteRule ^(.*)$ http://www.okokmedi.com$1 [L,R=301]
#
RewriteCond %{HTTP_HOST} okmediinfo\.ca [NC]
RewriteRule ^(.*)$ http://www.okokmedi.com$1 [L,R=301]





RewriteEngine on
RedirectPermanent / "http://www.panmose.com/fen/Over.htm"