Because of strange cross domain AJAX problems, causing AJAX requests to fail when not using www.(the PHP handler communicating with the request is given in a relative path, so it can’t be an address issue or something – that’s what this question is about though), I have forced www. using .htaccess :
#enable rewrite engine and set options Options +FollowSymLinks RewriteEngine on #only www. RewriteCond %{HTTP_HOST} !^www.domain.com$ RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301]
This works great. However, I want to allow other webmasters to post one of my forms on their website, using my form URL in their form’s action attribute. This always worked, however after my .htaccess change the forms are only submitted when the webmaster adds www. to the action value. Without www. the form will not get submitted.
How should I change my .htaccess file to make sure that these forms are also submitted without http://www.?
You could use
which will rewrite only GET requests, leaving POST requests as they are.