Find the answer to your Linux question:
Results 1 to 4 of 4
well i have a https server, but this page can be accesed through through http though. now i want to force apache that eeven if the user users http protocol ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie rituraj.goswami's Avatar
    Join Date
    Aug 2008
    Location
    Guwahati
    Posts
    135

    Question HTTPS only help


    well i have a https server, but this page can be accesed through through http though. now i want to force apache that eeven if the user users http protocol the server replies in https protocol. any idea will be appreceiated. the configuration is in /etc/httpd/conf.d/ssl.conf
    thanks in advance
    There is nothing impossible, for everything is possible; the impossible only takes a bit longer than the possible.

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Send back a redirect, for example in the header, to the https port.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Linux Newbie rituraj.goswami's Avatar
    Join Date
    Aug 2008
    Location
    Guwahati
    Posts
    135
    i can't use iptables!!!! as because the machine has RHEL 5 is custom made. so no iptables. any oder idea???
    There is nothing impossible, for everything is possible; the impossible only takes a bit longer than the possible.

  4. #4
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,482
    This is not IPTables!

    You would set it up in an .htaccess file in your directory

    Code:
    RewriteEngine On
    RewriteCond %{SERVER_PORT} !443
    RewriteRule (.*) https://www.example.com/require-secure/ [R]
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •