Hi!I have my osticket in a subfolder and I want to force the use of SSL. However, I don't know what to add in the .htaccess at root domain level because I have a wordpress website running there. This would be an example of the structure:www.mydomain.com -> the wordpress sitewww.mydomain.com/soporte/ the subfolder where osticket is installedThe .htaccess file located at root level has the wordpress rewrite code so, every time I want to specify that I want to run just the /soporte subfolder over SSL, the browser shows me "too many redirections" error.How can I run my osticket installation with SSL - without redirect the wordpress to SSL? (https://www.mydomain.com/soporte/)This is the .htaccess code that wordpress set:# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php </IfModule>DirectoryIndex index.php# END WordPress

Put another .htaccess file in the subdirectory.

I did it but it didn't work. It showed the "too many redirects" error. These are the different htaccess versiones I used:Version 1: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} Version 2:RewriteEngine OnRewriteCond %{HTTPS} !onRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}Version 3:RewriteEngine OnRewriteCond %{HTTPS} offRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} and more...

According to SO:

RewriteEngine On

RewriteCond %{HTTPS} !=on

RewriteRule ^(subdirectory/.*)$ https://www.mydomain.com/$1

Source: https://stackoverflow.com/questions/4762859/htaccess-redirect-subfolder-to-https

Thank you. It's not working. However after I enter manually to the URL with https and try to log in to OS Ticket, it shows this (after login page):Token CSRF válido requeridoI had to delete .htaccess for being able to log in again using https.

I don't understand why you are worried about the .htaccess files.I have two domains, both secured with SSL, both with WordPress installations in the root directories and both with multiple osTicket installations in various subfolders.I have never put even a moments thought into how WordPress and osTicket would co-exist, nor have I ever mucked about with .htaccess files for this reason.Either I am totally missing something here, or @[deleted] perhaps you are overthinking your setup.Are you trying to keep your WordPress site unencrypted?! If yes, why not simply encrypt everything?!

2 months later

I've changed osticket to a subdomain. Any ideas to force the use of https? My new address is like https://soporte.mydomain.comIf I enter that URL manually it works. But when I set the htaccess file it stops working. By the way, it's hosted at Cloudways.

Write a Reply...