1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

From Http To Https

Discussion in 'Help Wanted' started by SaadKS, Dec 9, 2017.

  1. valMETNG

    valMETNG Administrator Staff Member Admin

    I'm sorry - I don't understand. Your .htaccess file is blank? Please also post the errors from your error_log.
     
  2. SaadKS

    SaadKS New Member

    Whenever I try to upload any of these files I receive "file doesn't have an allowed extension"!
     
  3. valMETNG

    valMETNG Administrator Staff Member Admin

    Ah. Either give it an extension of .txt or you can just post the contents of the files as text surrounded by the code tags.
     
    SaadKS likes this.
  4. SaadKS

    SaadKS New Member

    .htaccess file


    # HTID:3348557: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
    php_value display_errors 1
    # DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:3348557:

    RewriteCond %{HTTP_HOST} ivirality\.net [NC]
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://ivirality.net/$1 [R,L]
    # DO NOT REMOVE THIS LINE AND THE LINES BELOW SSL_REDIRECT:SSL_REDIRECT
    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    # DO NOT REMOVE THIS LINE AND THE LINES ABOVE SSL_REDIRECT:SSL_REDIRECT
     
  5. SaadKS

    SaadKS New Member

    ERROR_LOGS

    <?php die(); ?>
    [10-Dec-2017 01:31:57 UTC] PHP Notice: Trying to get property of non-object in /home/u238937287/public_html/content/plugins/category_manager/templates/cat_man_edit_details.php on line 32
    [10-Dec-2017 01:31:57 UTC] PHP Notice: Trying to get property of non-object in /home/u238937287/public_html/content/plugins/category_manager/templates/cat_man_edit_details.php on line 38
    [10-Dec-2017 01:31:57 UTC] PHP Notice: Trying to get property of non-object in /home/u238937287/public_html/content/plugins/category_manager/templates/cat_man_edit_details.php on line 42
    [10-Dec-2017 01:31:57 UTC] PHP Notice: Trying to get property of non-object in /home/u238937287/public_html/content/plugins/category_manager/templates/cat_man_edit_details.php on line 46
    [10-Dec-2017 05:45:58 UTC] PHP Warning: MySQL server has gone away : SELECT COUNT(post_id) FROM htxh_posts WHERE post_archived = 'N' AND post_category = '3' AND post_type = 'news' AND post_status <> 'pending' in /home/u238937287/public_html/libs/extensions/ezSQL/mysqli/ez_sql_mysqli.php on line 313
    [10-Dec-2017 05:45:58 UTC] PHP Warning: MySQL server has gone away : SELECT tags_word, COUNT(tags_word) AS CNT FROM htxh_tags, htxh_posts WHERE tags_archived = 'N' AND (tags_post_id = post_id) AND (post_status = 'new' || post_status = 'top') GROUP BY tags_word ORDER BY CNT DESC LIMIT 25 in /home/u238937287/public_html/libs/extensions/ezSQL/mysqli/ez_sql_mysqli.php on line 313
    [10-Dec-2017 05:45:58 UTC] PHP Warning: MySQL server has gone away : SELECT UA.*, U.user_username, U.user_email FROM htxh_useractivity AS UA LEFT OUTER JOIN htxh_users AS U ON UA.useract_userid = U.user_id WHERE UA.useract_archived = 'N' AND UA.useract_status = 'show' AND UA.useract_id > 0 ORDER BY UA.useract_date DESC LIMIT 10 in /home/u238937287/public_html/libs/extensions/ezSQL/mysqli/ez_sql_mysqli.php on line 313
    [10-Dec-2017 05:45:58 UTC] PHP Warning: MySQL server has gone away : SELECT P.*, U.user_username, U.user_email FROM htxh_posts AS P LEFT OUTER JOIN htxh_users AS U ON P.post_author = U.user_id WHERE post_archived = 'N' AND post_status = 'new' AND post_type = 'news' ORDER BY post_date DESC LIMIT 10 in /home/u238937287/public_html/libs/extensions/ezSQL/mysqli/ez_sql_mysqli.php on line 313
    [10-Dec-2017 05:45:58 UTC] PHP Warning: MySQL server has gone away : SELECT C.*, U.user_username, U.user_email, P.post_title, P.post_url FROM htxh_comments AS C LEFT OUTER JOIN htxh_users AS U ON C.comment_user_id = U.user_id LEFT OUTER JOIN htxh_posts AS P ON C.comment_post_id = P.post_id WHERE C.comment_archived = 'N' AND C.comment_status = 'approved' AND P.post_status <> 'pending' AND P.post_status <> 'buried' ORDER BY C.comment_date DESC LIMIT 10 in /home/u238937287/public_html/libs/extensions/ezSQL/mysqli/ez_sql_mysqli.php on line 313
    [10-Dec-2017 16:30:30 UTC] PHP Notice: Undefined index: avatar_set_avatar in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:30:30 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:30:30 UTC] PHP Notice: Undefined index: avatar_get_avatar in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:30:30 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:31:00 UTC] PHP Notice: Undefined index: admin_footer in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:31:00 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:31:02 UTC] PHP Notice: Undefined index: bookmarking_settings in /home/u238937287/public_html/content/plugins/bookmarking/libs/BookmarkingFunctions.php on line 128
    [10-Dec-2017 16:31:02 UTC] PHP Notice: Undefined index: bookmarking_settings in /home/u238937287/public_html/content/plugins/bookmarking/libs/BookmarkingFunctions.php on line 128
    [10-Dec-2017 16:33:53 UTC] PHP Notice: Undefined index: admin_sidebar_categories in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
    [10-Dec-2017 16:33:53 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/u238937287/public_html/libs/PluginFunctions.php on line 113
     
  6. valMETNG

    valMETNG Administrator Staff Member Admin

    This is the base .htaccess file that comes with Hotaru:
    Code:
    #############################
    ##### EDIT THIS SECTION #####
    #############################
    
    Options +Indexes +FollowSymlinks
    RewriteEngine on
    
    ## Change to /folder if Hotaru is in a subfolder
    RewriteBase /
    
    ## Redirect www.example.com to example.com. Add ## if you don't need the redirect.
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    <IfModule mod_headers.c>
    Header set Connection keep-alive
    </IfModule>
    
    ################################################
    ##### DON'T EDIT ANYTHING BELOW THIS POINT #####
    ################################################
    
    ##### CORE ADMIN #####
    RewriteRule ^admin/?$ admin_index.php [L]
    RewriteRule ^admin/([a-zA-Z0-9_-]+)/?$ admin_index.php?page=$1 [L]
    RewriteRule ^admin/plugin_settings/plugin/([a-zA-Z0-9_-]+)/?$ admin_index.php?page=plugin_settings&plugin=$1 [L]
    
    ##### GENERIC RULES #####
    RewriteRule \.(css|php|png|jpg|gif|ico|js|inc|txt|gz|xml|html|zip)$ - [NC,L]
    RewriteRule ^([^/]*)/?$ index.php?page=$1 [L]
    RewriteRule ^([^/]*)/([^/]*)/?$ index.php?$1=$2 [L]
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)/?$ index.php?page=$1&$2=$3 [L]
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?$1=$2&$3=$4 [L]
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?page=$1&$2=$3&$4=$5 [L]
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?$1=$2&$3=$4&$5=$6 [L]
    If you've deleted all this (including appropriate modifications for your specific build), that is likely the cause of the 404.
     
  7. SaadKS

    SaadKS New Member

    I didn't delete anything... I just added the 3 lines from whynopadlock for the SSL... Should I copy everything just above my file's content?
     
  8. valMETNG

    valMETNG Administrator Staff Member Admin

    I'm guessing some of these are related to the plugins being out of order. Once you get the 404 error solved, I'd suggest then watching the error_log for new errors as you said the plugins are now in the correct order.
     
  9. valMETNG

    valMETNG Administrator Staff Member Admin

    I'd suggest using the .htaccess file I posted above but replacing:
    Code:
    ## Redirect www.example.com to example.com. Add ## if you don't need the redirect.
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    ...with:
    Code:
    # HTID:3348557: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
    php_value display_errors 1
    # DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:3348557:
    
    RewriteCond %{HTTP_HOST} ivirality\.net [NC]
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://ivirality.net/$1 [R,L]
    # DO NOT REMOVE THIS LINE AND THE LINES BELOW SSL_REDIRECT:SSL_REDIRECT
    RewriteEngine on
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    # DO NOT REMOVE THIS LINE AND THE LINES ABOVE SSL_REDIRECT:SSL_REDIRECT
     
  10. valMETNG

    valMETNG Administrator Staff Member Admin

    Sorry - I didn't notice you had the extra RewriteEngine on in there. Please remove the extra one right below:
    Code:
    # DO NOT REMOVE THIS LINE AND THE LINES BELOW SSL_REDIRECT:SSL_REDIRECT
     
    SaadKS likes this.
  11. SaadKS

    SaadKS New Member

    Everything is fixed!! Thank you!! I checked the registration area... It forces https, but I still see the warning on the right of the address bar about "unsafe scripts"... So now I see the registration form without the captcha!
     
    valMETNG likes this.
  12. valMETNG

    valMETNG Administrator Staff Member Admin

    You're welcome. Glad it resolved the issue. I don't see any issue in my address bar about unsafe scripts when I go to your registration page so I'm thinking that must be something on your local machine (e.g., a plugin/extension for your browser that may need to have your site whitelisted).
     
    SaadKS likes this.
  13. SaadKS

    SaadKS New Member

    I disabled it! I will enable it again!
     
  14. SaadKS

    SaadKS New Member

    It's ON again!
     

Share This Page