I had a static site with a WordPress blog in a subdomain. When I created a new site in WordPress, I installed WordPress in a subdirectory rather than asubdomain. I then forwarded the subdomain blog.example.com to example.com/blog. That works if someone is looking for the old home page of the blog. (They’re directed to the new blog home page.) My problem is that I haven’t been able to figure out how to redirect individual posts that used to be in blog.example.com (for example, blog.example.com/post1). If someone clicks on an old link, they end up with a 404 page-not-found error.
This is what I have in my .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I would be extremely grateful to anyone who can help me. I’ve been researching this for many hours and I have tried multiple suggestions but I don’t really understand how to get this to work.
This is what I have in my .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I would be extremely grateful to anyone who can help me. I’ve been researching this for many hours and I have tried multiple suggestions but I don’t really understand how to get this to work.