Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
RedirectMatch does not work for me:
Apache httpd.conf:
<VirtualHost :80> ServerName richardjaybrown.com RedirectMatch "^/(.)$" “https://richardjaybrown.com/$1” </VirtualHost>
When I browse to localhost, the redirect is triggered! Why is localhost considered the same as richardjaybrown.com?
Here is a working redirect for both NON WWW to WWW & HTTP to HTTPS. This covers the entire site. Running Ubuntu 14.04 with Apache. The .htaccess file is located in your root… example —> /var/www/html. The 000-default.conf file is located at /etc/apache2/sites-available/. Replace “yoursite.com” with your domain. Cheers. 03-31-2018.
<!-- .htaccess file -->
Options +FollowSymLinks -MultiViews
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A1209600
ExpiresByType text/html A1
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* loader.php [L,QSA]
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
<!-- 000-default.conf -->
<VirtualHost *:80>
ServerName www.yoursite.com
Redirect / https://www.yoursite.com/
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet