Opened 15 years ago
Closed 15 years ago
#13115 closed defect (bug) (fixed)
Wordpress should not serve robots.txt when it is not installed at the root of a site
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Rewrite Rules | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
Current behaviour:
Visiting http://some.domain.tld/wordpress/robots.txt causes wordpress to generate a robots.txt file, when actually such a file below the root directory has no meaning.
Desired behaviour: the robots.txt file is only meaningful when placed at the root of a domain. So wordpress should only do robots.txt handling if it is installed at the root of a domain, otherwise return 404 for all such requests.
Is this too late for 3.0? Feel free to punt. I'm working on a patch anyway though.
Attachments (2)
Change History (7)
#1
@
15 years ago
- Keywords dev-feedback added
The rewrite_rules are processed relative to Wordpress' installation directory, so nothing there can be changed directly there as far I can see.
One possible alternative:
Have a static robots.txt file and have Wordpress create/modify it when privacy options are changed AND wordpress is installed at the root of a domain.
set is_robots only if wp is at the root of the domain, otherwise set 404. This looks a little clumsy to me, so a better implementation is welcome