Forum Moderators: phranque
RewriteEngine on
#
# Externally redirect requests for non-blank non-canonical hostnames
# to the canonical hostname, preserving the requested URL-path
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule ^(.*)$ http://www.example.co[b]m/$1[/b] [R=301,L]
<!-- Since the canonicalization rule in .htaccess forces "www.example.com"
all links, included-object references, and POSTs should be to "www" only -->
<FORM METHOD=POST ACTION="http://[b]www.[/b]example.com/cgi-bin/formmail/FormMail.pl">
<input type="hidden" name="recipient" value="info@example.com">
<input type=hidden name="required" value="Name,Email,Comments">
<input type="hidden" name="return_html" value="http://[b]www.[/b]example.com/thankyou.html">