Title: .htaccess code
Last modified: January 20, 2023

---

# .htaccess code

 *  Resolved [dinotoyblog](https://wordpress.org/support/users/dinotoyblog/)
 * (@dinotoyblog)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/htaccess-code-5/)
 * This is an exciting plugin and I’m looking forward to seeing how it grows. I’ve
   successfully installed it on several sites but I’m unable to get it working on
   a blog located in a subdirectory. I’m trying to add the below code to the .htaccess
   file for that site (Apache).
 *     ```wp-block-code
       RedirectMatch "^\/\.well-known(.*)$" "\/blog\/\.well-known$1"
       ```
   
 * “Where ‘blog’ is the path to the subdirectory at which your blog resides.”
 * However, I’m unsuccessful and wonder if I’m putting in the subdirectory path 
   correctly. The site is in a first level subdirectory at “blog”, so will the code
   work as is, or do I need to include the full path/domain name? Is this the same
   at the URL? Perhaps someone could show me a working example of the code?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fhtaccess-code-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/)
 * (@pfefferle)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/htaccess-code-5/#post-16396625)
 * Have you added the snippet to the htaccess folder of the root directory?
 *  Thread Starter [dinotoyblog](https://wordpress.org/support/users/dinotoyblog/)
 * (@dinotoyblog)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/htaccess-code-5/#post-16397227)
 * Thanks for responding. Yes, I added the code to the .htaccess file in the root
   directory, but it didn’t do anything, which is why I wondered if I put in the
   subdirectory path in the correct format. Is it enough to put just the first level
   subfolder (i.e. “blog”) or do I need to include the full path (beginning “var/
   www/html…”) or full url (beginning https”)?
    -  This reply was modified 3 years, 4 months ago by [dinotoyblog](https://wordpress.org/support/users/dinotoyblog/).
 *  Thread Starter [dinotoyblog](https://wordpress.org/support/users/dinotoyblog/)
 * (@dinotoyblog)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/htaccess-code-5/#post-16417316)
 * I’m just following up to report that the code in the .htaccess file is working
   now – I used the code as is (i.e. just the word “blog”). I think my issue was
   caused by a cache-related delay.
 * I still see an error in site health but, despite that, the plugin seems to be
   working, e.g. blog users can be found and followed on Mastodon, and their blog
   posts are being shared to Mastodon.
 * Great plugin, thanks!
 *  Plugin Author [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/)
 * (@pfefferle)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/htaccess-code-5/#post-16448279)
 * I will have a look, why it still throws the error. Thanks for the feedback!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘.htaccess code’ is closed to new replies.

 * ![](https://ps.w.org/activitypub/assets/icon.svg?rev=3325036)
 * [ActivityPub](https://wordpress.org/plugins/activitypub/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/activitypub/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/activitypub/)
 * [Active Topics](https://wordpress.org/support/plugin/activitypub/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/activitypub/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/activitypub/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Matthias Pfefferle](https://wordpress.org/support/users/pfefferle/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/htaccess-code-5/#post-16448279)
 * Status: resolved