Some 3,000 Apache redirection rules are getting scrapped by a client (not a bad thing), and I wanted to make sure I had a note before that happened. All 3,000 rules are all variations on the following few types of redirection rule.
Tag Archives: apache
Protecting staging sites with Basic Authentication
This approach was primarily devised for use with WP Engine staging sites, but will work in any situation where you have no access to Apache’s config and need to use a single .htaccess file for multiple domains (e.g. a multisite setup). We’ve recently had a couple of projects hosted on WPEngine where we need to …
Continue reading “Protecting staging sites with Basic Authentication”
Setting HTTP Basic Authentication based on the host name
For many of our projects, the .htaccess file is under version control… but at the same time, I need to put HTTP Basic Authentiation on just the staging site. Unfortunately the host weren’t able to do this for me, but with a little .htaccess trickery I was able to detect the staging site URL and …
Continue reading “Setting HTTP Basic Authentication based on the host name”
WordPress and basic authentication, problems with WP Cron and file uploads
I have a Google ego search on my name, so I can keep track of what the Internets is saying about me behind my back. The other day the ego search summary email arrived and included was one of my development sites. Which was annoying because I don’t want people browsing around my development, it …
Continue reading “WordPress and basic authentication, problems with WP Cron and file uploads”
Problems with .htaccess and AFP over Netatalk
After yesterdays triumph of establishing contact with my virtual server over AFP, using Netatalk, I was perplexed today to find that my .htaccess files weren’t having any effect. Listing the files on the shared volume on my Mac seemed to show that they were there: ~$ ls -Al /Volumes/Home Directory/www/sites/jackspeak/site/ total 736 -rwxr-xr-x 1 simon …
Continue reading “Problems with .htaccess and AFP over Netatalk”
Simple Apache redirects
If you look around the web, you’ll see endless tutorials on how to configure Apache to do redirects using mod_rewrite. Undoubtedly mod_rewrite is a powerful way to control access and redirects on your Apache server, and it is enabled on many web hosts, but before you dive into the complexity and regular expressions of mod_rewrite, …