What htaccess to I need to ssl?

Post Reply
User avatar
cobber
Master Bludit
Posts: 78
Joined: Sun Feb 28, 2016 10:15 am
Location: Scotland
Has thanked: 21 times
Been thanked: 5 times

Morning

It's been a few years since I touched .htaccess files.

Does anyone have a template for an htaccess file for my site please.

I'm using ssl too

Many thanks
User avatar
cobber
Master Bludit
Posts: 78
Joined: Sun Feb 28, 2016 10:15 am
Location: Scotland
Has thanked: 21 times
Been thanked: 5 times

Anyone got any ideas. I'm hosting on ionos

Thanks
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Normally there is no need to modify the file .htaccess.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
cobber
Master Bludit
Posts: 78
Joined: Sun Feb 28, 2016 10:15 am
Location: Scotland
Has thanked: 21 times
Been thanked: 5 times

Ok so I'm officially Homer Simpson for the day (DOH!)

I forgot to add the url to the metadata.json file . . .

Boy do I feel stupid :roll: :oops:
User avatar
Edi
Site Admin
Posts: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

The file metadata.json?

The URL can be set at "Setting" > "General" > "Advanced" > "Site URL".
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
User avatar
cobber
Master Bludit
Posts: 78
Joined: Sun Feb 28, 2016 10:15 am
Location: Scotland
Has thanked: 21 times
Been thanked: 5 times

I see that too thanks Edi . . . think I need more coffee
SugaComa
Jr. Bludit
Posts: 6
Joined: Sat Nov 05, 2022 12:52 pm
Been thanked: 1 time

this might be a bit late, but I kept running into issues when moving around my site being "logged out"

after some investigation I found part of the site was https and others just http.
I edited my .htaccess to have the following

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

if

Code: Select all

RewriteEngine On
is already on then just add the rest set this in the root of your domain

this cured all my issues - now I just need to find a way to configure a single log in for the mix of sites involved.

its just meant to create a safe space for my family to stay in touch without requiring the hell of current social media. so I can if needed go with a simple site lock for everyone, but I want to make it feel more professional for them
Post Reply