| [ Index ] |
PHP Cross Reference of WordPress |
[Source view] [Print] [Project Stats]
Canonical API to handle WordPress Redirecting Based on "Permalink Redirect" from Scott Yang and "Enforce www. Preference" by Mark Jaquith
| File Size: | 549 lines (23 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| redirect_canonical( $requested_url = null, $do_redirect = true ) X-Ref |
| Redirects incoming links to the proper URL based on the site url. Search engines consider www.somedomain.com and somedomain.com to be two different URLs when they both go to the same location. This SEO enhancement prevents penalty for duplicate content by redirecting all incoming links to one or the other. Prevents redirection for feeds, trackbacks, searches, comment popup, and admin URLs. Does not redirect on IIS, page/post previews, and on form data. Will also attempt to find the correct link when a user enters a URL that does not exist based on exact WordPress query. Will instead try to parse the URL or query in an attempt to figure the correct page to go to. param: string $requested_url Optional. The URL that was requested, used to param: bool $do_redirect Optional. Redirect to the new URL. return: null|false|string Null, if redirect not needed. False, if redirect |
| lowercase_octets($matches) X-Ref |
| No description |
| _remove_qs_args_if_not_in_url( $query_string, Array $args_to_check, $url ) X-Ref |
| Removes arguments from a query string if they are not present in a URL DO NOT use this in plugin code. return: string The altered query string |
| redirect_guess_404_permalink( $current_url = '' ) X-Ref |
| Attempts to guess the correct URL from the current URL (that produced a 404) or the current query variables. param: string $current_url Optional. The URL that has 404'd. return: bool|string The correct URL if one is found. False on failure. |
| wp_redirect_admin_locations() X-Ref |
| No description |
| Generated: Fri May 25 03:56:23 2012 | Hosted by follow the white rabbit. |