Tuesday, June 14, 2016

Bitnami WordPress htaccess Redirect for Author Pages

As their page notes, for security purposes, the htaccess configuration has been moved outside of the webroot and AllowOverride is set to "None" https://wiki.bitnami.com/Components/Apache/htaccess_configuration.
In this instance I have an EC2 instance spun up from a BitNami (HVM) AMI.
The default file to edit is

Make a backup of the file before you edit.
Add this block anywhere in the file to redirect all author landing pages to the home page.

<Directory /opt/bitnami/apps/wordpress/htdocs/>
    RedirectMatch 301 "^/author/.*" http://www.yourdomain.com/
Customize to your liking if you would rather redirect to a different page.
When you're done editing, run this to restart apache, then test your changes.

sudo /opt/bitnami/ctlscript.sh restart apache
/* Joey */