Redirect .com to .org in .htaccess
You could use mod_rewrite to do this.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^example\.org$
RewriteRule ^ http://example.org%{REQUEST_URI} [L,R=301]
This rule redirects every request that’s not addressed to example.org
to the very same.
Redirects all www/non-www of domain.com
to domain.org
:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.org/$1 [R=301,L]