|
|
 |
Re: FN-FORUM: htaccess rewrite
date posted 12th March 2008 21:10
You nearly got it Brian!
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R,L]
Lee Rickler
Director - Point and Stare - pointandstare.com
Web Design and Development for over 11 years
Brian Lycett wrote:
> Perhaps something like:
>
> RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
> RewriteCond %{SERVER_PORT} !443
> RewriteRule ^(.*)$ http://www.domain.com/$1 [R,L]
>
> might work.
>
>
>> I am using this in the root level htaccess file to force users onto
>> www.domain.com
>>
>> RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
>> RewriteRule ^(.*)$ http://www.domain.com/$1 [R,L]
>>
>> Trouble is I am using it with an SSL cert and https:// is being diverted
>> to http://
>>
>> Is there another rule that would be something like -
>>
>> do the above unless it's a https:// URL?
>>
>> Thanks,
>>
>> Lee Rickler
>> Director - Point and Stare - pointandstare.com
>> Web Design and Development for over 11 years
>>
>> --
>> Freelancers, contractors earn more with Prosperity4
>> Call 0870 870 4414 or visit www.prosperity4.com
>> and benefit from Inland Revenue approved expenses today.
>>
>> To advertise here: http://www.freelancers.net/advertising.html
>>
>>
|
 |
|