I have WordPress at address http://www.example.com/blog/, now I want it to be accessible as http://www.example.com/ without moving wordpress to root directory.
I have made appropriate .htaccess changes.
wp-config.php:
define("WP_HOME", "http://{$_SERVER["HTTP_HOST"]}");
define('WP_CONTENT_DIR', $_SERVER["DOCUMENT_ROOT"] . "/blog/wp-content");
define('WP_CONTENT_URL', "http://{$_SERVER["HTTP_HOST"]}/blog/wp-content");
One thing that doesn't work is WordPress uses www.example.com/wp-includes/ instead of www.example.com/blog/wp-includes/
There are even includes like www.example.com/%post-name%/wp-includes/js/jquery/jquery.js?ver=1.7.2
I have fixed it through .htaccess:
RewriteRule wp-includes/(.*) /blog/wp-includes/$1 [L]
Is threre a better way?