XF 1.5 Forcing HTTPS and Subdomain Change in XF 1.5

Tiki Tiki

Active member
Hey, gang! I only know enough to be dangerous! Can someone help me with my .htaccess file so that I can both force HTTPS and simultaneously reroute any requests to my main domain to instead go to a subdomain?

I've got a certificate in place, and have recently moved my forums from domain.net to community.domain.net. I've changed the relevant settings inside of xenForo, and I've tried a couple of changes to my .htaccess file, but it only appears to be half working. If you're starting out new with the website, it probably looks/acts correctly, but if you're coming from an old bookmark or link it jumps right back to HTTP not secure.

Help!
 
You can use cloudflare will let you to permanent SSL without going back to HTTP.
Go to cloudflare > Crypto,
  1. SSL: Flexible
  2. Always Use HTTPS: On
  3. Authenticated Origin Pulls: On
  4. Opportunistic Encryption: Off
  5. Onion Routing: On
  6. TLS 1.3: On
  7. Automatic HTTPS Rewrites: On

If you don't like to use cloudflare. Then follow here to config your own .htaccess from public_html/.htaccess or /var/www/html/.htaccess
PHP:
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com [NC]
RewriteRule .? https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
 
Top Bottom