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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.