Jump to content

Downloads links are in an infinite redirect loop


paperweight

Recommended Posts

When a logged-in user clicks to download a link, the link looks like this:

https://website.com/whmcs/dl.php?type=d&id=20

 

But after the click, the browser says there is a redirect loop and the process can not be completed.

 

This is the first time I activated downloads on my site, soi I never witnessed this problem before. Any ideas what this could be causing the problem?

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

What are your Setup > General Settings > WHMCS System URL and WHMCS SSL System URL settings?

This behaviour could suggest they're configured incorrectly. The first should begin http:// and the second should be blank or being http:// if you have your own SSL certificate installed.

Link to comment
Share on other sites

Hi John, many thanks for your help~

WHMCS System URL: https:///whmcs.mysite.com

WHMCS SSL System URL: [blank]

 

Above is what is currently in the fields. I do have SSL installed.

 

For the "WHMCS SSL System URL" I tried adding https:///whmcs.mysite.com but when I click "Save Changes" the resulting page makes that info disappear, so it is blank again like above.

 

If I change the "WHMCS SSL System URL" to http:///whmcs.mysite.com (I remove the 's' from http) then after I "save Changes" it remains there as http:///whmcs.mysite.com but the doanloads still have the redirect loop, so it appears to not help.

 

Any other thoughts on a fix for this malady?

Link to comment
Share on other sites

hehe, thanks. the 3 slashes was a typo I made in this forum~ Doesn't 3 slashes get me to the webpage faster than 2 ;)

 

Ok, but I do have SSL installed and I want to force users to visit that, so why would I not have the https in both fields? I mean, for the "WHMCS System URL" I want users to visit the https version of the entire site so I am confused about what goes where. I realize it probably appears simple but it is still confusing~~

 

I am checking htaccess as well since I recently added a 404 Error addon that maybe is impacting this. I will work on it today.

Link to comment
Share on other sites

Ok, good news and bad news:

 

Good news is I fixed the problem. It was a combination of the incorrect URLs in the System URLs and the htaccess errors. MY downloads now work.

 

Bad news is that I now do not have SSL forced on the installation. I previously had forced https on the entire installation using this in the htacess:

 

# This rewrites URLs to force https on all requests to whmcs

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

RewriteCond %{HTTPS} off

RewriteCond %{REQUEST_URI} !^/dl.php [NC]

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

 

RewriteCond %{HTTPS} on

RewriteCond %{REQUEST_URI} ^/dl.php [NC]

RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

 

RewriteEngine On

RewriteCond %{SERVER_PORT} 80

RewriteRule ^(.*)$ $1 [R,L]

 

However, now I removed that. I need to force SSL on the entire installation on all the pages because of the requirements of my users. I know this is taxing on the server, but it's important for my clients. Any idea how I can now force https throughout?

 

Here are also my current URL settings:

WHMCS System URL: http://whmcs.mysite.com

WHMCS SSL System URL: https://whmcs.mysite.com

 

I appreciate all your great feedback to help me.

Edited by paperweight
adding the URL settings too
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated