Opened 6 years ago
Closed 6 years ago
#3671 closed enhancement (fixed)
index.php files for static pages on wordpress.org are accessible/indexable
Reported by: | jonoaldersonwp | Owned by: | |
---|---|---|---|
Milestone: | Priority: | low | |
Component: | Make (Get Involved) / P2 | Keywords: | seo |
Cc: |
Description
Static pages are implemented by creating index.php
files within named folders. As a result, the actual index.php
file is directly accessible (in addition to the named folder), which results in SEO, accessibility and analytics issues.
E.g., wordpress.org/download/
co-exists with wordpress.org/downloads/index.php
This includes the homepage, /downloads/
, and other significant pages. As far as I can see, this issue can be resolved in three ways, in order of preference:
1) All requests ending in /index.php
should be configured to serve a 301 redirect to the previous level folder. Note, however, this logic would need to be stored/executed somewhere central/low in the stack (which may prove challenging to implement and manage), and may create unexpected behaviours for other requests which legitmately end in index.php - and whilst I haven't seen any such cases, I haven't dug particularly deeply.
2) 301 redirects should be created all static/standalone paths/pages created in this manner (i.e., folders with index.php
files), and stored/executed via .htaccess
files (or equivalent) in the respective folders.
3) 301 redirects should be created on a case-by-case basis for specified pages.
In all cases, query parameters and/or fragments should be preserved during the redirect (e.g., /page/index.php?key=var#hash
should redirect to /page/?key=var#hash
).
Just noting the URLs that this still applies to, as the
/download
example is no longer:/mobile/
which will hopefully be fixed by #4096 being implemented as a theme template/support/
which will be resolved by removing the bbPress 1 install that's still hidden there/hosting/
/search/
/list/
which needs moving into a bbPress/BuddyPress page somewhere