0

I am installing a wordpress site in sub-directory of my existing site. is there a way to edit the settings in wordpress so that when i type in my primary URL (i.e. www.main.com) it automatically reroutes to www.main.com/subdirectory?

1 Answers1

0

WordPress doesn't control the part of your site it is not installed in. However, one answer would be to use a PHP redirect in your index.php in the root of your site.

index.php would look like this:

<?php header("Location: http://www.yoursite.com/your_blog"); ?>

If you put that line as the only line in your index.php in the root of your site, it will redirect. Obviously, replacing the URL with the real URL to your blog.