.htaccess - Category Archive

How to Update a WordPress Domain

Header image of this blog post which includes the post title as well as a background with some computer code

If you’re thinking about changing your domain name for your existing WordPress website, you’ll need to follow some basic steps to make sure you do it right. In addition to causing delays and headaches, if you don’t do things right you could permanently ruin your search engine rankings and cause a variety of other disastrous consequences. In this guide, we’ll … Read More

Helpful .htaccess Redirect Code That Actually Works

Banner for this blog post with title and nice image of a stream

I’ve been doing this around 12 years now, and I still get so frustrated that the code I find online for .htaccess redirects never seems to work. I don’t know if everyone is just using old methods, or if maybe they only apply to certain hosting environments, or what the problem is. So for my own reference, I have saved … Read More

Redirect Entire WordPress Website Except One Page

Banner for post with post title overlaid over photo of car near sharp turn

Redirecting or forwarding an entire WordPress website except a single page (such as the home page) to another address is actually quite easy. If you’re here, I’m guessing you followed a number of tutorials and tried your hand at crafting the perfect .htaccess file only to be let down every single time when it inevitably didn’t work at all. Well … Read More

Checklist of Ways WordPress Redirects to HTTPS + How to Force HTTP

This post might seem a little backwards but there is way less information for this topic than the other way around! I am regularly faced with the need to force http rather than the other way around. Disabling SSL and its inherent encryption is generally not something you want to do in ideal circumstances, but I suspect nobody is here under ideal … Read More

Redirect One File Extension to Another with .htaccess

Redirect File Extension To Another Htaccess

For something seemingly so simple, it’s amazingly hard to find a good solution that redirects all files with a given extension on your site to another. I spent a long time Googling and testing and still kept running into issues. But my wasted time is your gain! Because I’ve figured it out. As it turns out, there is more way … Read More

Converting SSI / SHTM Sites to PHP in Minutes – Guide

I was recently lucky enough to purchase a local website hosting company, and I quickly discovered that about 30% of the websites used .shtm files. These SSI files used “HTML Include” directives to load additional content to each page, such as the header and footer. And they didn’t function – at all – on my servers. As it turns out, … Read More

Saving Permalinks Doesn’t Update .htaccess File – WordPress Bug

Contents of the .htaccess file being empty

There is a bug in the current WordPress version (4.9.1) that prevents the .htaccess file from being updated properly when you save the permalinks. Evidently this bug existed in 4.9, but it is still a problem! I noticed this over the last week or two. On multiple WordPress sites, when I’ve gone to update the permalink structure, every page returns … Read More

Redirection Plugin Not Working for HTML Pages

Today I want to focus on a very simple problem that’s pretty easy to solve. This problem occurs when using the Redirection plugin for WordPress and attempting to redirect .html or .htm pages and having it not work. This could also apply to any instance of a static page ending in .php, .txt, .zip, or whatever else you might have. … Read More

Why Your .htaccess Redirects Never Work in WordPress

For years, I kept making simple .htaccess 301 redirects for old pages on my WordPress sites, and they never seemed to work! It was incredibly frustrating, especially since I would always test out my redirects with an .htaccess checker, and they would always pass. I kept thinking maybe I just didn’t have the required mastery of regular expressions, or possibly I was … Read More

Redirect With .htaccess and Godaddy Hosting Not Working – Solution

Goddady Server Redirect

For something that seems so simple, there’s a lot that can go wrong with setting up either a temporary (302) redirect or permanent (301) redirect. With Godaddy hosting specifically, you may run into an issue that you did not foresee. You may even have no trouble redirecting the ENTIRE site, but to redirect just the home page you may encounter … Read More