.htaccess force non-www to www with single page exception

Started by mhilliard, April 02, 2013, 23:09:57 PM

Previous topic - Next topic

mhilliard



We've successfully forced all pages in the site to use WWW using the following code in Akeeba's .htaccess tool:

##### Redirect non-www to www -- BEGIN
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/TEST_SITE/$1 [R=301,L]
##### Redirect non-www to www -- END


But this Virtuemart site registration page is an exception that has to use a URL that doesn't include the WWW. Two days of testing and research and the only thing I can produce are errors and infinite loops. Does anyone have a suggestion for forcing all pages to WWW except this one page?

http://mysite.com/TEST_SITE/component/users/?view=registration

It seems like it should use a simple redirect before the general WWW redirect, but I can't find a comparable solution in the forums. I'm grateful for any ideas....

Specs: Joomla 2.5.9, VM2.0.20b

PRO

why does it have to be different?
I think thats the problem you need to address