rhovisions
Member
Posted 2 years ago #
I was curious if someone could help me with something...
I'm trying to put a WordPress blog on the home page of my site. The issue I'm having is the site is already developed, and so the WordPress install is in a subfolder ('blog'). Is there anyway to get it so when someone visits my homepage it goes to the blog subfolder without changing the URL? I have a .htaccess setup.
jasonhuynh
Member
Posted 2 years ago #
Hello rhovisions,
If you utilize .htaccess, you can just create a rewrite to direct all url requests to the blog sub directory. An example of this would be:
# Rewrite rule for primarydomain.com
RewriteCond %{HTTP_HOST} ^(www\.)?primarydomain\.com
RewriteCond %{REQUEST_URI} !^/subdirectory
Rewriterule ^(.*)$ /maindomain/$1 [L]
[signature moderated Please read the Forum Rules]
@rhovisions,
If you are making the WordPress install your main site (power it from the root, so it is accessed from domain.com), you could look into moving WordPress to the root, while leaving the files in the subdirectory (domain.com/blog), by following these instructions:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
You are basically moving the index.php and .htaccess files to the root, all the rest in the blog subdirectory. Make sure you follow all the steps outlined in the tutorial.