Results 1 to 9 of 9

Thread: SSL on admin login

  1. #1
    Join Date
    May 2008
    Posts
    15

    Default SSL on admin login

    Hi There,

    This may be a basic question, but how can I force SSL on the admin login?

    Thanks,

    Michael

  2. #2
    Join Date
    Nov 2007
    Location
    Dallas, TX
    Posts
    322

    Default

    Create a .htaccess file in the root admin folder.

    In it put:
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^clientsadd.php$
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    Also, you might want to create another .htaccess file in the root of your site and in it put
    Code:
    <Files "*.tpl">
    Order Allow,Deny
    Deny from All
    </Files>
    The reason for the second one is that you can open up all of your custom template files and make direct copies of them. This fix will prevent that.
    Brett

  3. #3

    Smile

    Thanks for this code as well, Brett.
    I've bee after this code and how to do it for some time.

    Thanks

    Quote Originally Posted by Brett View Post
    Create a .htaccess file in the root admin folder.

    In it put:
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^clientsadd.php$
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    Also, you might want to create another .htaccess file in the root of your site and in it put
    Code:
    <Files "*.tpl">
    Order Allow,Deny
    Deny from All
    </Files>
    The reason for the second one is that you can open up all of your custom template files and make direct copies of them. This fix will prevent that.

  4. #4
    Join Date
    Jan 2008
    Posts
    643

    Default

    thanks

    that was what I was looking for
    thanks

  5. #5
    Join Date
    Nov 2008
    Location
    Sydney, AU
    Posts
    3

    Default

    Check this thread:

    Code:
    http://forum.whmcs.com/showthread.php?t=8481

  6. #6
    Join Date
    Sep 2008
    Location
    Fox River State Penitentiary, Michigan
    Posts
    583

    Default

    Nice one. Very handy. Thanks guys!

  7. #7
    Join Date
    Apr 2008
    Posts
    51

    Default

    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI}whmcs/admin
    RewriteRule ^(.*)$ https://www.yourdomain.co.uk/$1 [R,L]

    This works perfect with our EV
    Kind Regards, Richard Copestake, Managing Director
    Bionic Hosting Ltd | UK Web Hosting | UK Reseller Hosting | Toys FOr Joys
    Tel: 0845 074 3297 | Fax: 01452 357971

  8. #8
    Join Date
    Oct 2008
    Location
    UK
    Posts
    114

    Default

    Thankyou, works great
    NC-Designs Hosting Solutions Ltd | Affordable Hosting Solutions Since 2008
    LiteSpeed cPanel Web Hosting | Up to 9x Faster Than Standard Web Hosts
    Domain Name Registration | Domain Names with an easy management panel

  9. #9
    Join Date
    Jan 2009
    Location
    INDIA
    Posts
    8

    Default

    Quote Originally Posted by BionicInternet View Post
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{REQUEST_URI}whmcs/admin
    RewriteRule ^(.*)$ https://www.yourdomain.co.uk/$1 [R,L]

    This works perfect with our EV


    Thank you for the information. And please let me know how to do it for a sub domain.
    ie: cart.domain.com is my whmcs path.


    Thank you in advance

Similar Threads

  1. clients login form redirects to admin login page!
    By Reza in forum Customisation & Integration Questions
    Replies: 1
    Last Post: 11-15-10, 03:55 PM
  2. SSL and Custom Admin Login
    By MACscr in forum Customisation & Integration Questions
    Replies: 3
    Last Post: 01-01-07, 12:32 AM