How can I Mimic SSL on an HTTP virtual host?
<VirtualHost *:443>
ServerName secure.example.com
ServerAlias dbadmin.example.com
RewriteEngine on
RewriteCond %{SERVER_NAME} dbadmin.example.com
RewriteRule !/dbadmin(.*)$ /dbadmin$1
</VirtualHost>
Tags: apache mod-rewrite https
Source: By kaybenleroll as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- How can you track a downloaded file?
- What is error log per Virtual Host?
- Make Apache / XAMPP serve file outside of htdocs folder. Make XAMPP and Apache serve file outside of htdocs folder.
- How do I get authenticated user ID under Apache using PHP & HTTP Authentication?
- MySQL and Apache Error in MySQL SQL query.
- .htaccess directives to *not* redirect certain URLs.
- How can you configure Google Maps over SSL?
- Block user access to internals of a site using HTTP_REFERER.
- How can I set up Python scripts to work in Apache 2.0?
- How can I redirect my HTTPS to HTTP?
- Mod-Rewrite loading files behind DocumentRoot. DocumentRoot - DocumentRoot - DocumentRoot.
- How would you change your file suffix from one file to another?
- How do I create an SSL certificate for a web application?
- Why does mod_rewrite fetched all requests except for one specific path?
- How do I compile Apache HTTP server from the start and redeploy its binaries to a different location?