make button (static / numbered) served via https

Discussion in 'General Help' started by PPNSteve, Oct 6, 2018.

  1. PPNSteve

    PPNSteve PPN Top 50

    currently hqave our VL and the button image dirs set to a https url but when button.php processes the link, it serves a http image (not the expected https).

    What can we do to get it to use https?

    example headers:


    VL URL:

    sample button link code:
    <a href=""><img src=";buttontype=rank" alt="PPN Top 50"></a>
    cajkan likes this.
  2. Basti
    • Staff

    Basti Administrator Staff Member

    Have a look in your admin settings. Looks like you didn't updated the button urls to https yet
    cajkan and Mark like this.
  3. PPNSteve

    PPNSteve PPN Top 50

    Pretty sure its using HTTPS


    Attached Files:

  4. Basti
    • Staff

    Basti Administrator Staff Member

    Was the image in your first post already there when you posted it? How could I miss that? I get old....

    Have a close look at the request and response headers. Your member requested http, but got a 302 redirect for the image url to https.

    I see, he indeed use the button.php url, please post your button.php here to investigate

    P.s your site returns error 500 for me today
    Last edited: Oct 22, 2018
  5. PPNSteve

    PPNSteve PPN Top 50

    Yup sorry if i wasn't being clear.. the requests are definitely HTTPS however the actual button image is served via HTTP..
    code tag didn't allow post to process.. txt file attached..

    OK apparently switching the server over to PHP 7.x breaks the topsite script.. set domain back to php5

    Attached Files:

  6. Basti
    • Staff

    Basti Administrator Staff Member

    Did you modified button.php?

    I see some non default redirects which should not happen. e.g should normally not redirect to a rank button unless you have buttontype=rank in it
    This happens because of the last statement in here and a another
    if ($_GET['buttontype'] == 'rank' || $_GET['buttontype'] == 'stats' || !isset($_GET['buttontype'])) {
    Normally these members should get the default static button, not a rank one.
    This is not really related but pls update your button.php with the attached code and instead put the redirect into .htaccess if you need that functionality

    button.php is from vl 1.6 with some error fixes as well

    Any other custom stuff? button related plugins? custom htaccess code? redirects set in cpanel?

    It seems you have a https redirect in htaccess, is that correct? can you post that one?
    If you want you can also drop me ftp info so I can verify stuff easier and maybe test

    Attached Files:

    Last edited: Oct 30, 2018
  7. PPNSteve

    PPNSteve PPN Top 50

    ok, the updated button.php doesn't fix it..

    .htaccess does have https redirect:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
    RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^(.*)$$1 [R,L]
    ################ Require ending trailing slash
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ directly returns a https image in the browser but not when in the a href button tag for whatever reason


  8. PPNSteve

    PPNSteve PPN Top 50

    just to show..


    ['count_pv'] = 1//Count pageviews

    $CONF['text_link_button_alt'] = 'PPN Top 50'// Text Link Anchor, Alt for Buttons
    $CONF['text_link'] = 1//Enable Text Link
    $CONF['static_button'] = 0// Show Only Static Button
    $CONF['static_button_url'] = '';

    $CONF['rank_button'] = 1//Show buttons with rank 1.gif, 2.gif etc
    $CONF['default_rank_button'] = '';
    $CONF['button_dir'] = '';
    $CONF['button_ext'] = 'gif';
    $CONF['button_num'] = 300;

    $CONF['stats_button'] = 0//Show Dynamic Stats Button

    $CONF['hidden_button_url'] = '';

  9. Basti
    • Staff

    Basti Administrator Staff Member

    I don't have the same as you anymore,
    General part says https, which redirects to http image itself, Location:

    You MUST have something custom like I asked before somewhere.
    There is no way button.php returns buttons/sky if your button config is defined as buttons/xmas

    And in that custom thing, things must be wrong
  10. PPNSteve

    PPNSteve PPN Top 50

    no custom things.. its not liking the "&buttontype=rank" part in the button image link.. for whatever reason

    notice its even doing it in the sample link

    not sure what is causing it but it's very annoying
  11. Basti
    • Staff

    Basti Administrator Staff Member

    I cant help you further here man im sorry. Not without ftp access.
    Fact is your button config says /xmas , but /sky is returned. There has to be something custom, either as a plugin which modifies something, or a redirect directly in cpanel.
    But fact remains that there has to be something

Share This Page