• Home
  • Blog
  • Contact Us
  • Home
  • Blog
  • Contact Us

Redirection Problem When Installing WordPress

Last Updated: 13 July 2014 By Mike Haydon

I had an issue today with a wordpress installation that I’ve seen a few times and finally figured out how to fix (it’s *facepalm* easy!)

The Problem

When I installed wordpress on an addon domain through Fantastico Deluxe in the Cpanel area of a Hostgator Hatchling account (try saying that 10 times fast!), the domain would change from

http://targetdomain.com

to

http://targetdomain.hostdomain.com

or

http://hostdomain.com/targetdomain.com

It has only ever happened with the Hatchling account on Hostgator.

I tried all the solutions offered on different forums, tried reinstalling, checking config.php, etc. It was so frustrating! I wasted hours trying to find the solution and some projects were pushed back that should have been well on their way by now. I had a temporary workaround for a few sites, but that wasn’t good enough.

Finally figured out how to fix it easily and without the workaround.

The Solution

For some reason, installing wordpress through Fantastico Deluxe for an addon domain didn’t also install a .htaccess file. Usually this doesn’t matter. Sometimes you’ll have a .htaccess file there already and wordpress just amends it.

The fix is to install wordpress as normal, through Fantastico Deluxe, then upload a .htaccess file to your targetdomain.com root with the standard wordpress rewrite in it. Just copy and paste the following into a text document:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Then save as .htaccess (that’s without a file name and the extension is htaccess, rather than say txt or doc).

Upload it via ftp (use Filezilla if you don’t have an ftp program, or just do it through the file manager in Cpanel). Then login to http://targetdomain.com/wp-admin/ and it will work as it should. Doh!

If this doesn’t fix it for you, please let me know in the comments and I’ll try to help you figure it out.

Filed Under: Wordpress
Originally Posted: 16 January 2012

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Web Design

marketing banner

Want to learn how to build your own websites? Check out the course we jointly developed here.

Recent Posts

  • Moving Wordpress Without Plugins
  • Redirection Problem When Installing Wordpress
  • Edit The Default Wordpress RSS Widget
  • Best Wordpress Spam Filtering Plugin
  • Optimize Your Wordpress Site For Mobile
  • Wordpress Delete Post Revisions
  • Add Twitter Follower Count To A Wordpress Page

How Can We Help You?

  • Website Design Service
  • Google Penalty Recovery Service
  • Search Engine Optimization Service

Categories

  • Online Marketing
  • SEO
  • Social Media
  • Website Design
  • Wordpress

At A Glance

  • Ranking
  • Website Design
  • WordPress
  • Social Media
  • Contact
  • Google Penalties
  • Earnings Disclosure
  • Privacy Policy

Contact Us

Local SEO Perth

Contact Us Here

Copyright © 2023