Jump to content

How to force https for one folder, http for rest of site


sisom

Recommended Posts

Hi guys (and gals), I have an .htaccess file set up in my /trellis folder, for my Trellis Desk support ticket system (which I can thoroughly recommend, by the way, it's free as well), which forces all pages to be https.

I would like to force all the other pages on the site (which are in the root folder) to be http. Is this possible?

I know that I can just use absolute URLs on the Trellis Desk pages, but I presume it's better to use relative URLs and I thought it might be possible to add something to my current .htaccess file.

 

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteCond %{REQUEST_URI} trellis

RewriteRule ^(.*)$ https://www.mydomain.com/trellis/$1 [R,L]

 

 

I know nothing about .htaccess files programming, I have just copied and pasted them and they've worked for me in the past, so I apologise if the fix for this is obvious to somebody!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.