Knowledge Base - Featured Articles

Browse all
lynette.miles's picture

The .htaccess file controls a number of ways that a website can be accessed, blocked, and redirected. It does this using a series of one or more rewrite rules. These rewrites are made possible by Apache's mod_rewrite module.

mod_rewrite provides a way to modify incoming URL requests, dynamically, based on regular expression rules. This allows you to map arbitrary URLs onto your internal URL structure in any way you like.

The basic formulation of any .htaccess rewrite rule includes setting a combination of rewrite condition (RewriteCond) tests along with a corresponding rule (RewriteRule) if the prior conditions pass. In most cases, these rules should be placed at any point after the RewriteEngine on line in the .htaccess file located in the website's docroot.

adam.malone's picture

This article was originally posted on Adam Malone's blog at Mounting Acquia locally with sshfs.

One of the things that I've been working on recently as part of my MBOs with Acquia is related to learning and teaching Drupal 8. My latest self-enforced task is to port the SimpleSAMLphp Authentication module and create a new and shiny D8 version. After migrating most of the routing, configuration and form structures, I started to work on the business logic and get federated login working.

I've been using the free Identity Provider (IdP) provided by Feide to remove the pain of setting up my own IdP. The only caveat to this was that I needed to ensure my Service Provider (SP) was accessible from the general web; this was not possible when running Drupal 8 on my laptop. The quickest way for me to get a Drupal 8-ready platform that would be accessible online was to spin up a quick Acquia Cloud Free site and work from there. Unfortunately, I would then lose the use of PHPStorm and all the benefits a solid IDE brings to Drupal 8 development.

adam.malone's picture

Drupal's Fast 404 functionality can significantly reduce load on servers by preventing a full page render and presenting a simple 404 page for all missing pages.