WordPress.org

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

/.well-known/

This plugin enables "Well-Known URIs" support for WordPress

How can I define a well-known uri?

Set a callback for an URI (/.well-known/robots.txt). The action is a combination of well_known_ and the file-name, in this case the hook must look like

add_action('well_known_robots.txt', 'robots_txt');

Print robots.txt:

function robots_txt($query) {
  header('Content-Type: text/plain; charset=' . get_option('blog_charset'), true);
  echo "User-agent: *";
  echo "Allow: /";

  exit;
}

Is there an implementation where I can write off?

Yes, you can find an example plugin, which defines a well-known-uri, here: http://wordpress.org/extend/plugins/host-meta/

Requires: 3.5.1 or higher
Compatible up to: 3.8.9
Last Updated: 2013-2-18
Active Installs: 30+

Ratings

0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1
100,1,1
100,2,2
100,1,1