label = __( '.htaccess Viewer', 'health-check' );
$this->description = __( 'The .htaccess file tells your server (if supported) how to handle links and file requests. This file usually requires direct server access to view, but if your system supports these files, you can verify its content here.', 'health-check' );
parent::__construct();
}
public function tab_content() {
global $wp_rewrite;
if ( $wp_rewrite->using_mod_rewrite_permalinks() ) {
if ( file_exists( ABSPATH . '.htaccess' ) ) {
printf(
'
%s', esc_html( file_get_contents( ABSPATH . '.htaccess' ) ) ); } else { printf( '
%s
', __( 'Your site is using.htaccess rules to handle permalinks, but no .htaccess file was found. This means that your .htaccess file is not being used to handle requests.', 'health-check' )
);
}
} else {
printf(
'%s
', __( 'Your site is not using.htaccess to handle permalinks. This means that your .htaccess file is not being used to handle requests, and they are most likely handled directly by your web-server software.', 'health-check' )
);
}
?>