.htaccess for WP in /blog/
-
Hi guys,
I’ve installed WordPress in a sub-directory called /blog/. It works fine, and so far I’ve created a navbar and some Pages for Home, About, etc.
Now, what I want to do is send requests for https://www.mysite.com/ to the blog home Page I created, e.g. https://mysite.com/blog/home/. Optionally I’d also like to send requests for https://www.mysite.com/about.htm to https://www.mysite.com/blog/about/. There are various reasons for this, but the most important one is the home page obviously.
I now have the following .htaccess file in the root directory:
RewriteEngine On
RewriteBase /
RewriteRule ^$ /blog/home/
RewriteRule ^about.htm$ /blog/about/‘Interestingly’ enough, the home page redirection lands on /blog/(index.php) and displays the posts. The about page lands on the blog 404 page.
Any idea what I’m doing wrong here?!? I’m totally lost. I thought it’d just be a simple thing. Guess not… ??
For performance reasons I only want to use the RewriteRule method (versus a php redirect or something). If I use the [R] option it does work, BUT is obviously far from ideal as it requires unnecessary extra communications, etc.
Looking forward to any replies/ideas/help/etc! ??
Kind regards,
Koek
- The topic ‘.htaccess for WP in /blog/’ is closed to new replies.