Introduce yourself here! In order to avoid spam, new users must first comment on the discussion in the 'Introductions' before they become 'full members'
How to change from HTTP to HTTPS?
  • Dear all. 

    I think is important for Flatpress. 

    How to change all URLs from HTTP to HTTPS in automatic without compromising the functioning of the site and its related content link?

    You have some idea o plug-in?

    thanks
  • You just need to enable SSL on your server and your blog will work with https links automatically, but you will need to buy an SSL certificate otherwise some browsers will block your site for security reasons.

    I changed one of my sites to https myself - just by enabling it on the server but I just did it to test (not because I really wanted it) so I did not purchase a certificate... so I do not know if you will be able to access this in your browser, but it works for me in old Opera:

    https://dfcsg.co.uk/

    This is the sort of message you might see in modern browsers (this is in Vivaldi) - some may not even let you proceed to the site if it does not have a valid SSL certificate:

    image

  • Yes, I have the certificate. But when I install it the old HTTP links (which are so many) doesnt work. I should rename manually and the list is very long since the site exists since 2005.

    How can rename links?
  • Hi,

    this Forum entry should solve the issue with HTTPS.

    regards
  • Hi laborix.

    Maybe I don't understand...

    I have no problem installing the security certificate. My provider thinks about it automatically but only for the primary directory. The problem is that just after installing and transforming into HTTPS all the old internal links do not work because they remain HTTP.

    This is my "drama". 
  • Hi musicletter,

    I'm not sure what you mean or what your problem is. So, please, give this steps a try:

    2. Rename your defaults.php on the Webspace to defaults.old
    3. Transfer the new defaults.php to your Webspace.
    4. Switch your webspace to HTTPS and test.

    All entry links created by Flatpress in your blog are now working with HTTPS, but all links you have included manually must replaced by your working hand manually.
     
    If the new defaults.php is working for you, leave as it is. If not, switch back to HTTP and replace the defaults.php with your old one. Then you have another Problem, that's not related to Flatpress.

    regards
  • Hi laborix,

    I understand, then I will try to do it as soon possible, after check I'll write you.

    Thanks


    PS
    I have a different defaults comparing original. It's okay? 

    define('BLOG_ROOT', ('/'==($v=str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])))? $v : $v.'/')); 

  • Hi, I have started the certificate https on my server,  downloaded http://www.aadmm.org/fp-patch/fp-content/attachs/defaults-file.zip and unzipped, now graphically my 2 websites work (https://www.guerrenelmondo.it/ and https://www.warsintheworld.com/) but I have errors, connection not sure. I have modified all links of images, ets.. from http to https.

    Where is the problem because they are not sure ?
  • I have resolved:

    1)All links in first web page have to be changed from http to https
    2)Have to do what write laborix (above) that is:
    2. Rename your defaults.php on the Webspace to defaults.old
    3. Transfer the new defaults.php to your Webspace.


    5)Create (.htacces) in your / on website (or transfer this with an ftp client like Filezilla


    #
    # Apache/PHP/Drupal settings:
    #

    # Protect files and directories from prying eyes.
    <FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
      Order allow,deny
    </FilesMatch>

    # Don't show directory listings for URLs which map to a directory.
    #Options -Indexes

    # Follow symbolic links in this directory.
    #Options +FollowSymLinks

    # Make Drupal handle any 404 errors.
    ErrorDocument 404 /index.php

    # Force simple error message for requests for non-existent favicon.ico.
    <Files favicon.ico>
      # There is no end quote below, for compatibility with Apache 1.3.
      ErrorDocument 404 "The requested file favicon.ico was not found.
    </Files>

    # Set the default handler.
    #DirectoryIndex index.php

    # Override PHP settings. More in sites/default/settings.php
    # but the following cannot be changed at runtime.

    # PHP 4, Apache 1.
    <IfModule mod_php4.c>
      php_value magic_quotes_gpc                0
      php_value register_globals                0
      php_value session.auto_start              0
      php_value mbstring.http_input             pass
      php_value mbstring.http_output            pass
      php_value mbstring.encoding_translation   0
    </IfModule>

    # PHP 4, Apache 2.
    <IfModule sapi_apache2.c>
      php_value magic_quotes_gpc                0
      php_value register_globals                0
      php_value session.auto_start              0
      php_value mbstring.http_input             pass
      php_value mbstring.http_output            pass
      php_value mbstring.encoding_translation   0
    </IfModule>

    # PHP 5, Apache 1 and 2.
    <IfModule mod_php5.c>
      php_value magic_quotes_gpc                0
      php_value register_globals                0
      php_value session.auto_start              0
      php_value mbstring.http_input             pass
      php_value mbstring.http_output            pass
      php_value mbstring.encoding_translation   0
    </IfModule>

    # Requires mod_expires to be enabled.
    <IfModule mod_expires.c>
      # Enable expirations.
      ExpiresActive On

      # Cache all files for 2 weeks after access (A).
      ExpiresDefault A1209600

      <FilesMatch \.php$>
        # Do not allow PHP scripts to be cached unless they explicitly send cache
        # headers themselves. Otherwise all scripts would have to overwrite the
        # headers set by mod_expires if they want another caching behavior. This may
        # fail if an error occurs early in the bootstrap process, and it may cause
        # problems if a non-Drupal PHP file is installed in a subdirectory.
        ExpiresActive Off
      </FilesMatch>
    </IfModule>

    # Various rewrite rules.
    <IfModule mod_rewrite.c>
      RewriteEngine on

      # If your site can be accessed both with and without the 'www.' prefix, you
      # can use one of the following settings to redirect users to your preferred
      # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
      #
      # To redirect all users to access the site WITH the 'www.' prefix,
      # (http://example.com/... will be redirected to http://www.example.com/...)
      # adapt and uncomment the following:
      # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
      # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
      #
      # To redirect all users to access the site WITHOUT the 'www.' prefix,
      # (http://www.example.com/... will be redirected to http://example.com/...)
      # uncomment and adapt the following:
      # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
      # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

      # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
      # VirtualDocumentRoot and the rewrite rules are not working properly.
      # For example if your site is at http://example.com/drupal uncomment and
      # modify the following line:
      # RewriteBase /drupal
      #
      # If your site is running in a VirtualDocumentRoot at http://example.com/,
      # uncomment the following line:
      # RewriteBase /

      # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !=/favicon.ico
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    </IfModule>

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    # $Id: .htaccess,v 1.90.2.5 2010/02/02 07:25:22 dries Exp $


    6)Switch your webspace to HTTPS and test.
  • Hi Panther, thanks so much, I solved with the server technicians that made the change.
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion