Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2017-02-16 19:10:10

Photoscenic
Member
Registered: 2016-10-27
Posts: 14

SSL Certificate

Hello !

I've just installed an SSL Certificate on my web site : https://photoscenic.com.au/

I changed the 2 http links in the Backlight settings to https:

-Company URL: https://www.photoscenic.com.au

-Site URL: https://www.photoscenic.com.au

Everything is working fine in the galley section of the site, but the following links are returning 404 error pages:

https://www.photoscenic.com.au/about/

https://www.photoscenic.com.au/contact/

It must have been a silly thing that I forgot to do. Any ideas ?

Cheers,

Thomas

Offline

#2 2017-02-16 20:12:26

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: SSL Certificate

Hi Thomas,  can you check that the file .htaccess is there at the top of your site?  This file handles URLs such as /about/.  Since it starts with a full stop, it may be hidden from view.  If so, check for settings to show hidden files in your FTP client.

Offline

#3 2017-02-16 22:10:12

Photoscenic
Member
Registered: 2016-10-27
Posts: 14

Re: SSL Certificate

Hi Ben
The .htaccess file is there and here is what's inside:

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www.photoscenic.com.au$ [OR]
RewriteCond %{HTTP_HOST} ^photoscenic.com.au$
RewriteRule ^$ "https\:\/\/photoscenic\.com.au\/" [R=301,L]

I'm not sure if this is correct though.

Offline

#4 2017-02-16 22:24:10

charlie.choc
Member
From: Marietta, GA
Registered: 2014-01-09
Posts: 359
Website

Re: SSL Certificate

FYI, this is the rule in my .htaccess and it works OK

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Offline

#5 2017-02-17 01:38:30

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: SSL Certificate

This will be okay to enforce https connections to be used, but the pages created with the backlight designer require some additional rules to work. You can consult the .htaccess file in the top directory of the backlight distribution for comparison.

Offline

#6 2017-02-17 02:25:56

charlie.choc
Member
From: Marietta, GA
Registered: 2014-01-09
Posts: 359
Website

Re: SSL Certificate

That's not the only rule in my .htaccess, just the rule added to the Backlight one for https.

Offline

#7 2017-02-17 08:27:19

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: SSL Certificate

Your top-level .htaccess should include all of this in order for the /about/ type URLs to work:

<IfModule mod_rewrite.c>
	RewriteEngine On

	############################################################################
	# Edit this section for servers using FastCGI

	# For FastCGI (or seeing the error message 'No input file specified.':
	# add # to the start of the next line
	RewriteBase /

	RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$

	# For FastCGI (or seeing the error message 'No input file specified.':
	# add # to the start of the next line and remove # from the line after)
	RewriteRule ^.*$ - [E=BASE:%2]
	#RewriteRule ^(.*)$ - [E=BASE:]

	############################################################################



	RewriteRule ^(.*)$ - [E=QS:mod_rewrite=on]

	RewriteRule ^([^\/.]*)-single.php$ %{ENV:BASE}single.php?%{ENV:QS}&id=$1 [QSA,L]

	RewriteRule ^([^\/.]*).css$ %{ENV:BASE}index.php?%{ENV:QS}&extension=css&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).js$ %{ENV:BASE}index.php?%{ENV:QS}&extension=js&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).gif$ %{ENV:BASE}index.php?%{ENV:QS}&extension=gif&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).png$ %{ENV:BASE}index.php?%{ENV:QS}&extension=png&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).jpg$ %{ENV:BASE}index.php?%{ENV:QS}&extension=jpg&name=$1 [QSA,L]

	#RewriteCond %{QUERY_STRING} !mod_rewrite=on
	#RewriteRule ^index.php$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]

	RewriteCond %{QUERY_STRING} !mod_rewrite=on
	RewriteRule ^mobile.php$ %{ENV:BASE}mobile.php?%{ENV:QS} [QSA,L]

	RewriteCond %{QUERY_STRING} !mod_rewrite=on
	RewriteRule ^(.*)download.php %{ENV:BASE}download.php?%{ENV:QS} [QSA,L]
	
	RewriteRule ^$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]
	
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d

	RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]

</IfModule>

Offline

#8 2017-02-17 09:49:30

Photoscenic
Member
Registered: 2016-10-27
Posts: 14

Re: SSL Certificate

Thank you all for your help , unfortunately I'm not such an expert in applying this into the file. I'm only a photographer without much experience in web language. Could one of you actually type it with my website address? Thank you

Offline

#9 2017-02-17 09:58:46

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: SSL Certificate

there is no need for that. Your web address does not need to be in the file.
The .htaccess file that comes with Backlight already contains all of what Ben posted. You just need to make sure that the file is in the root of your site. If you haven't done so already, upload the .htaccess file that came with the Pages module to the root of your site.
http://backlight.theturninggate.net/doc … on_install

Depending on your system settings, you may not be able to see the .htaccess file in the download folder. If this is the case, you need to set your system to show hidden files. You can find out how by Googling "show hidden files" for your system.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#10 2017-02-17 14:58:41

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: SSL Certificate

I'm happy to edit the file for you so that it includes both your current .htaccess content (the www to non-www redirect) and the Backlight .htaccess content.  Let me know and I can email you the edited file to then upload to your web server.

Offline

#11 2017-02-17 16:17:53

Photoscenic
Member
Registered: 2016-10-27
Posts: 14

Re: SSL Certificate

All good now , I uploaded the .htaccess from the original folder of my download as Rod suggested and it worked straight away. Incidentally I did try Ben's suggestion but for some reason that did not work. May be because I copied and pasted. 
Thank you all for your help!
Thomas

Offline

#12 2017-02-17 19:18:55

michilge
Member
From: Sprockhövel, Germany
Registered: 2013-04-15
Posts: 206
Website

Re: SSL Certificate

The code Ben posted is for Backlight.

If You have set up the site with https form the beginning, everything will be fine.
If You have installed the certificate after installation of backlight, it would serve as good measure to paste the code to enforce use of https over http just for the case You missed changing some internal link to the https form. Also if a visitor types http that will redirect the request and prevent the visitors browser from complaining about Your site being less secure because of "mixed content" which means both encrypted and unencrypted.

It must be somewhere between RewriteEnging On and </IfModule>

the whole aould look like

<IfModule mod_rewrite.c>
	RewriteEngine On

        ###################################
        # Redirect all traffic to HTTPS
        ###################################

        RewriteCond %{HTTPS} off
        RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

	############################################################################
	# Edit this section for servers using FastCGI

	# For FastCGI (or seeing the error message 'No input file specified.':
	# add # to the start of the next line
	RewriteBase /

	RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$

	# For FastCGI (or seeing the error message 'No input file specified.':
	# add # to the start of the next line and remove # from the line after)
	RewriteRule ^.*$ - [E=BASE:%2]
	#RewriteRule ^(.*)$ - [E=BASE:]

	############################################################################

        ###################################
        # Adjustments for Backlight
        ###################################


	RewriteRule ^(.*)$ - [E=QS:mod_rewrite=on]

	RewriteRule ^([^\/.]*)-single.php$ %{ENV:BASE}single.php?%{ENV:QS}&id=$1 [QSA,L]

	RewriteRule ^([^\/.]*).css$ %{ENV:BASE}index.php?%{ENV:QS}&extension=css&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).js$ %{ENV:BASE}index.php?%{ENV:QS}&extension=js&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).gif$ %{ENV:BASE}index.php?%{ENV:QS}&extension=gif&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).png$ %{ENV:BASE}index.php?%{ENV:QS}&extension=png&name=$1 [QSA,L]
	RewriteRule ^([^\/.]*).jpg$ %{ENV:BASE}index.php?%{ENV:QS}&extension=jpg&name=$1 [QSA,L]

	#RewriteCond %{QUERY_STRING} !mod_rewrite=on
	#RewriteRule ^index.php$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]

	RewriteCond %{QUERY_STRING} !mod_rewrite=on
	RewriteRule ^mobile.php$ %{ENV:BASE}mobile.php?%{ENV:QS} [QSA,L]

	RewriteCond %{QUERY_STRING} !mod_rewrite=on
	RewriteRule ^(.*)download.php %{ENV:BASE}download.php?%{ENV:QS} [QSA,L]
	
	RewriteRule ^$ %{ENV:BASE}index.php?%{ENV:QS} [QSA,L]
	
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d

	RewriteRule ^(.*)$ %{ENV:BASE}index.php?%{ENV:QS}&page=$1 [QSA,L]

</IfModule>

Offline

#13 2018-05-09 17:17:50

DomB
Member
From: CH
Registered: 2016-05-05
Posts: 59
Website

Re: SSL Certificate

Hello,

Sorry, but I just installed ssl on my site.
.htacces is at the root but there is a problem of posting.
what do you think ?
https://www.dbersier.com

Oups i change compagny url and compagny site in Setting and now it's ok.. sorry

Last edited by DomB (2018-05-09 17:22:24)


Je ne perds jamais: soit je gagne, soit j’apprends (N. Mandela)

Offline

Board footer

Powered by FluxBB