Tips, Tricks & Howto's Found a different way of using WHMCS or something that you think would help others? If so, post elsewhere and we'll move it here. (closed to new threads)

Reply
 
Thread Tools Display Modes
  #1  
Old 01-25-08, 09:54 PM
RPS RPS is offline
Senior Member
 
Join Date: Jan 2008
Posts: 332
Default Protect using SSL

With the current way WHMCS handles SSL, your clients can log in on pages that are not via SSL. There are also other areas that WHMCS forces to use http instead of https (I believe the announcements and knowledgebase are both without https).

You can use .htaccess to force everything to happen via https, however, file downloads will NOT work if this is the case.

When you try to download a file using rewrite rules that forces your URL to be https, IE has an issue with downloading files (in this case, the downloads page).

Open 'Configuration' -> 'General Configuration'
Set WHMCS System URL to https://www.domain.com/whmcs/ (note the s within https)
Set WHMCS SSL System URL to empty

The follow code (which you should place inside your .htaccess file), will force all requests to the WHMCS folder to be done via https, unless it is the whmcs/dl.php file.

The code after, will force the whmcs/dl.php to redirect from https to http.

Code:
RewriteEngine on
Options +FollowSymlinks

#Rewrite the URL for WHMCS to always use https except for the whmcs/dl.php file
RewriteCond %{REQUEST_URI} !^/whmcs/dl.php [NC]
RewriteCond %{REQUEST_URI} ^/whmcs/ [NC]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

#Rewrite the URL for WHMCS dl area to always use http
RewriteCond %{REQUEST_URI} ^/whmcs/dl.php [NC]
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
Reply With Quote
  #2  
Old 01-26-08, 01:57 PM
ruskyhost ruskyhost is offline
Junior Member
 
Join Date: Jan 2008
Posts: 10
Default SSL

This worked great!, thanks.

Dave.
Reply With Quote
  #3  
Old 02-03-08, 08:05 PM
idweb idweb is offline
Junior Member
 
Join Date: Feb 2008
Posts: 3
Default

Agree with ruskyhost, this worked great. Was getting certificate error before I tried this now no problems. Thanks !!
Reply With Quote
  #4  
Old 02-11-08, 04:31 AM
rosend511 rosend511 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 13
Default

This is not working for me. I did the config thing, edited the .htaccess and nothing. Someone help please...
Reply With Quote
  #5  
Old 02-11-08, 05:49 AM
RPS RPS is offline
Senior Member
 
Join Date: Jan 2008
Posts: 332
Default

What do you mean by "not working"

When you bring your car into the mechanic shop, do you simply tell the mechanic that your car "isn't working" ?
Reply With Quote
  #6  
Old 02-11-08, 10:40 AM
rosend511 rosend511 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 13
Question lol

http://www.cod4gs.com/my/

Go try to order something with Google Checkout. You will see what I mean. I think the problem is that I have an old certificate on there, but I did not know how to check and take it off.

Help....
Reply With Quote
  #7  
Old 02-11-08, 03:59 PM
RPS RPS is offline
Senior Member
 
Join Date: Jan 2008
Posts: 332
Default

Your SSL cert is for dindarahosting.com, not cod4gs... You need to contact your host to fix this.
Reply With Quote
  #8  
Old 02-11-08, 10:03 PM
rosend511 rosend511 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 13
Default they dont know how.

they dont know how.
Reply With Quote
  #9  
Old 02-11-08, 10:05 PM
RPS RPS is offline
Senior Member
 
Join Date: Jan 2008
Posts: 332
Default

Quote:
Originally Posted by rosend511 View Post
they dont know how.
- Find a new host then

It's like asking your auto mechanic to replace your tire, and the guy looks at you and says "I don't know how to replace a tire"
Reply With Quote
  #10  
Old 02-11-08, 11:48 PM
rosend511 rosend511 is offline
Junior Member
 
Join Date: Feb 2008
Posts: 13
Default

well im my own host, so how do i do it. i have full access cpanel.
Reply With Quote
  #11  
Old 02-12-08, 01:45 AM
RPS RPS is offline
Senior Member
 
Join Date: Jan 2008
Posts: 332
Default

Quote:
Originally Posted by rosend511 View Post
well im my own host, so how do i do it. i have full access cpanel.
- Ask in cPanel forums or WHT, not here in WHMCS. It's a hosting problem. Honestly though, if you don't know how to manage your server, you need to hire a server admin.
Reply With Quote
  #12  
Old 02-12-08, 08:33 AM
PPH PPH is offline
Senior Member
 
Join Date: Jan 2007
Location: USA
Posts: 1,400
Default

Quote:
Originally Posted by rosend511 View Post
well im my own host, so how do i do it. i have full access cpanel.
Currently it appears you suspended your own site?

http//www.cod4gs.com/my/
currently loads:
http://nsanewebhosting.org/suspended.page/
__________________
best regards,
George

Last edited by PPH; 02-12-08 at 08:37 AM.
Reply With Quote
  #13  
Old 02-12-08, 09:11 AM
JasonO JasonO is offline
Senior Member
 
Join Date: Jan 2008
Location: Ashford, Kent, UK
Posts: 426
Default

Maybe when he said he was his own host, he meant he was only a reseller?
__________________
Jason
»
Hosting4Network.co.uk
» Web Hosting from £1.50 per month
» Teamspeak Hosting from £0.25 per slot
Reply With Quote
  #14  
Old 02-12-08, 10:37 AM
PPH PPH is offline
Senior Member
 
Join Date: Jan 2007
Location: USA
Posts: 1,400
Default

Quote:
Originally Posted by JasonO View Post
Maybe when he said he was his own host, he meant he was only a reseller?
Yeah could be since they also said:

Quote:
i have full access cpanel.
__________________
best regards,
George
Reply With Quote
  #15  
Old 03-07-08, 02:28 PM
tropicalwebshop tropicalwebshop is offline
Junior Member
 
Join Date: Mar 2008
Posts: 5
Default

Is this fix still necessary with the release of Version 3.6?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:23 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.