Page 3 of 12 FirstFirst 12345 ... LastLast
Results 31 to 45 of 177

Thread: Protect using SSL

  1. #31
    Join Date
    Jul 2007
    Posts
    47

    Default

    Worked well, glad to see this (I'm not htaccess-literate and wouldn't have known how to do this) as it greatly improves security.

  2. #32
    Join Date
    Mar 2008
    Location
    CA, USA
    Posts
    20

    Default

    I'll have to try it out. Thank you so much for sharing this!
    [URL="http://webhostcentral.net"]webhostcentral.net[url]

  3. #33
    Join Date
    Mar 2008
    Posts
    7

    Default

    The only issue i have with this is when i put the .htaccess in my cron jobs stop working, as soon as the code is put into the .htaccess for redirect the cron jobs are gone. Is there something i can put in to prevent this happening?.
    TM Hosting [ www.tmhosting.net ] -
    A Canadian company providing services and support you deserve 24/7 around the clock.
    *NEW* Now offering cPanel/WHM & DirectAdmin Hosting Solutions

  4. #34
    Join Date
    Jan 2008
    Posts
    354

    Default

    Quote Originally Posted by tmhost View Post
    The only issue i have with this is when i put the .htaccess in my cron jobs stop working, as soon as the code is put into the .htaccess for redirect the cron jobs are gone. Is there something i can put in to prevent this happening?.
    - Try this untested code instead:

    PHP 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/admin/cron.php [NC]
    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/admin/cron.php [NC]
    RewriteCond %{REQUEST_URI} ^/whmcs/dl.php [NC]
    RewriteCond %{SERVER_PORT} !^80$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] 
    Btw, do you have an SSL cert currently installed?

  5. #35
    Join Date
    Apr 2008
    Posts
    5

    Default SSL

    Hi, this was a great tip. I used it and it works great. My .htaccess file was blank. I downloaded it to my desktop, added the code, named the file ht.txt, uploaded it to my server, then renamed the file .htaccess. Made the mods in the config area, and it works great.

    Thanks for the post. Things are getting better all the time.

  6. #36
    Join Date
    Mar 2008
    Posts
    7

    Default

    Quote Originally Posted by RPS View Post
    - Try this untested code instead:

    PHP 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/admin/cron.php [NC]
    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/admin/cron.php [NC]
    RewriteCond %{REQUEST_URI} ^/whmcs/dl.php [NC]
    RewriteCond %{SERVER_PORT} !^80$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] 
    Btw, do you have an SSL cert currently installed?

    Yes i have a ssl cert installed and active.
    TM Hosting [ www.tmhosting.net ] -
    A Canadian company providing services and support you deserve 24/7 around the clock.
    *NEW* Now offering cPanel/WHM & DirectAdmin Hosting Solutions

  7. #37
    Join Date
    Mar 2008
    Posts
    7

    Default

    When i put a .htaccess file into my public_html i get a Internal Server Error 500 error in WHMCS
    TM Hosting [ www.tmhosting.net ] -
    A Canadian company providing services and support you deserve 24/7 around the clock.
    *NEW* Now offering cPanel/WHM & DirectAdmin Hosting Solutions

  8. #38
    Join Date
    Jan 2008
    Posts
    354

    Default

    Add each line in steps and see where the problem lies...

    Start with this:

    PHP Code:
    RewriteEngine on 
    Then

    PHP Code:
    RewriteEngine on
    Options 
    +FollowSymlinks 
    Then

    PHP Code:
    Then RewriteEngine on
    Options 
    +FollowSymlinks

    #Rewrite the URL for WHMCS to always use https except for the whmcs/dl.php file
    RewriteCond %{REQUEST_URI} !^/whmcs/admin/cron.php [NC]
    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] 

  9. #39
    Join Date
    Mar 2008
    Posts
    7

    Default

    I get the error as soon as i create the .htaccess file
    TM Hosting [ www.tmhosting.net ] -
    A Canadian company providing services and support you deserve 24/7 around the clock.
    *NEW* Now offering cPanel/WHM & DirectAdmin Hosting Solutions

  10. #40
    Join Date
    Mar 2008
    Posts
    7

    Default

    I fixed it. Thanx for your help the mod worked.
    TM Hosting [ www.tmhosting.net ] -
    A Canadian company providing services and support you deserve 24/7 around the clock.
    *NEW* Now offering cPanel/WHM & DirectAdmin Hosting Solutions

  11. #41
    Join Date
    Jan 2008
    Posts
    354

    Default

    Care to post the fix so the next person with the htaccess problem knows what to do?

  12. #42
    Join Date
    Mar 2008
    Posts
    7

    Question Can someone guide me

    Can someone guide me how to use this on a sub-domain?

    So that I can use it on http:// sub.domain.com

    Regards,
    Martin

    Quote Originally Posted by RPS;57608

    [php
    RewriteEngine on
    Options +FollowSymlinks

    #Rewrite the URL for WHMCS to always use https except for the whmcs/dl.php file
    RewriteCond %{REQUEST_URI} !^/whmcs/admin/cron.php [NC]
    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/admin/cron.php [NC]
    RewriteCond %{REQUEST_URI} ^/whmcs/dl.php [NC]
    RewriteCond %{SERVER_PORT} !^80$
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L][/php]

  13. #43
    Join Date
    Jun 2008
    Posts
    4

    Default

    Quote Originally Posted by Martin View Post
    Can someone guide me how to use this on a sub-domain?

    So that I can use it on http:// sub.domain.com

    Regards,
    Martin
    I second this, this code doesn't work if your using a subdomain.....and if your trying to protect it using ssl for the admin either. Any help would be greatly appreciated......

  14. #44
    Join Date
    Mar 2008
    Posts
    7

    Exclamation

    Is there non who can tell me (and others) how this can be done with a sub domain

  15. #45
    Join Date
    Aug 2007
    Location
    Scotland
    Posts
    24

    Default

    Assuming you therefore have your WHMCS in the 'root' of the sub-domain, I would guess that slight mod to the above should work ...

    PHP Code:
    RewriteEngine on
    Options 
    +FollowSymlinks

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

    #Rewrite the URL for WHMCS dl area to always use http
    RewriteCond %{REQUEST_URI} ^/dl.php [NC]
    RewriteCond %{SERVER_PORT} !^80$
    RewriteRule ^(.*)$ http://subdomain.domain.com/$1 [R=301,L] 

Page 3 of 12 FirstFirst 12345 ... LastLast

Similar Threads

  1. Enom / id protect
    By tripler in forum Customisation & Integration Questions
    Replies: 3
    Last Post: 02-24-12, 03:22 PM
  2. ID Protect for Domains
    By webjunk in forum Customisation & Integration Questions
    Replies: 3
    Last Post: 02-04-09, 12:06 AM