I’ve recently redirected my home page of http://untangible.com to http://untangible.com/blog using Apache’s mod_rewrite functions. This way users coming to the main site are transparently redirected to the blog yet the old Google indexed URLs that are referencing the blog subfolder still work. I wanted my sitemap which is built by a WordPress plugin to reference the URLs without the blog subdirectory since it’s cleaner. Instead of manually changing the xml output (which would have taken all of 10 seconds) I decided to change the WordPress address setting in the control panel. My thought was that it would then just reference untangible.com instead of untangible.com/blog while still redirecting traffic to the proper path due to the mod_rewrite rule in place.

After doing this the website could still be viewed properly and all the links worked but when trying to sign into wp-admin the system would just bring me back to the login page without any error messages. To fix the issue I had to log into my virtual host site and manually change the siteurl field in the options MySQL table back to http://untangible.com/blog.

Lesson learned. Read about what the functions do before making assumptions.