VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: mhilliard on April 02, 2013, 23:09:57 PM

Title: .htaccess force non-www to www with single page exception
Post by: mhilliard on April 02, 2013, 23:09:57 PM


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://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 (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
Title: Re: .htaccess force non-www to www with single page exception
Post by: PRO on April 03, 2013, 01:22:34 AM
why does it have to be different?
I think thats the problem you need to address