Created
March 11, 2010 00:24
-
-
Save boogah/328641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Index.php fix | |
| Plugin URI: http://ilikewordpress.com/loading-wordpress-from-index-php | |
| Description: This plugin allows a blog installed at root to be addressed by /index.php. Remedies stripping of filename by includes/canonical.php | |
| Author: Steve Johnson | |
| Version: 1.0 | |
| Author URI: http://ilikewordpress.com/ | |
| */ | |
| /* | |
| * Applies filter to redirect_canonical to defeat | |
| * stripping of index.php file | |
| */ | |
| function fix_index( $requested_url ) { | |
| if ( get_bloginfo( 'url' ) == $requested_url ) | |
| return false; | |
| } | |
| add_filter( 'redirect_canonical', 'fix_index' ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment