Skip to content

Single (Non-)WWW and HTTPS Redirect in Apache

View on Twitter

💡 A quick way to speed up a site is to redirect to (non-)www and https in one step.

Using Apache, the following config in your .htaccess file redirects to non-www and https.

Gist: https://gist.github.com/Maximization/fd1745fe21dda13bcbbc620ec195291d

Redirecting from (non-)www and https in a single step with Apache. Source available at: https://gist.github.com/Maximization/fd1745fe21dda13bcbbc620ec195291d
You might also like
Use Native Promises With Node.js fs Module Read tip
Find Vulnerabilities in Your Nginx Configuration Read tip
Make Your Site Portable By Using Permalinks Read tip