Forum Moderators: phranque
I've been trying to get this implemented for ages now
I originally posted here: [webmasterworld.com...]
then got directed here: [webmasterworld.com...]
but this solutions seems to be split between httpd.conf and htaccess so it not quite working
Has a solution that works well been found, maybe in a more recent post?
Thanks for your time
PS:
I have this at present:
RewriteCond %{SERVER_PORT} ^443$
RewriteCond $1!^(basket¦promotion¦dj) [NC,OR]
RewriteCond $1!\.(css¦gif¦jpe?g¦bmp¦js¦inc¦swf)$ [NC]
RewriteRule (.*) [test.domain.com...] [R=301,L]
This allows https in basket, but not /promotion/ or /dj/ (redirects to http)
[edited by: BenSeb at 2:47 pm (utc) on Oct. 16, 2007]
Do you think this would work? Tried it and seems ok but I'm not too hot on htaccess so might have a few flaws?
RewriteCond %{SERVER_PORT} ^443$
#RewriteCond $1!^(basket¦promotion¦dj) [NC,OR]
RewriteCond $1!^basket
RewriteCond $1!^dj
RewriteCond $1!^ads
RewriteCond $1!^promotion
RewriteCond $1!\.(css¦gif¦jpe?g¦bmp¦js¦inc¦swf)$ [NC]
RewriteRule (.*) [test.domain.com...] [R=301,L]
You want the redirect
if NOT (A or B or C)
AND
if NOT (D or E or F)
Adding the [OR] flag in there messes up the logic, and guarantees that the rule will always execute.
For more on this subject, do a search on "DeMorgan's Theorem."
Jim