htaccess rules for blog hosted in subfolder
-
my blog is hosted in a subfolder, so i added a rewrite to my root .htaccess:
RedirectMatch "^\/.well-known/(webfinger|nodeinfo|x-nodeinfo2|activitypub)(.*)$" /blog/.well-known/$1$2
however, subsequently, the blog doesn’t know how to handle this, and throws a 404. So I change it to
RewriteRule "^\/.well-known/(webfinger|nodeinfo|x-nodeinfo2|activitypub)(.*)$" /blog/index.php?well-known [QSA]
But I get an error:
Fatal error: Uncaught Error: Call to undefined method WP_Error::get_url() in /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-content/plugins/activitypub/integration/class-webfinger.php:36
Stack trace:
#0 /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-includes/class-wp-hook.php(310): Activitypub\Integration\Webfinger::add_user_discovery()
#1 /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-includes/plugin.php(205): WP_Hook->apply_filters() 2 /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-content/plugins/webfinger/includes/class-webfinger.php(146): apply_filters()
#3 /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-includes/class-wp-hook.php(310): Webfinger::generate_user_data()
#4 /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#5 /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-content/plugins/webfinger/includes/c in /srv/home/blog/domains/blog.com/htdocs/www/blog/wp-content/plugins/activitypub/integration/class-webfinger.php on line 36What did i do wrong?
- The topic ‘htaccess rules for blog hosted in subfolder’ is closed to new replies.