Redirect wordpress site to www from non www on wordpress server

Unfortunately on wordpress.com hosted sites, the www is automatically removed. For self-hosted wordpress installs, there are several ways to do this. In .htaccess file using something like: Options +FollowSymlinks RewriteCond %{HTTP_HOST} !^(www\.|$) [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] or set values for WordPress address and Site address in the WordPress Admin Dashboard: Settings > General or … Read more

Force a 403 response to xml file in WordPress

So to restate your question you want mydomain.com/autodiscover/autodiscover.xml to produce a 403, and your WordPress installation is at mydomain.com/ ? Then this should do it to match that specific file only: RewriteRule ^autodiscover/autodiscover.xml – [R=403,NC,L]

Clone WordPress for testing on localhost (with Fiddler)

I added this to Fiddler’s script in %USER%\Documents\Fiddler2\Scripts\CustomRules.js under OnBeforeResponse and the response rewrite started working static function OnBeforeResponse(oSession: Session) { if (m_Hide304s && oSession.responseCode == 304) { oSession[“ui-hide”] = “true”; } if (oSession.oResponse.headers.ExistsAndContains(“Content-Type”,”text/html”)){ oSession.utilDecodeResponse(); oSession.utilReplaceInResponse(‘127.0.0.3′,’my.domain.name’); oSession.utilReplaceInResponse(‘http:’,’https:’); } } and needed to set // define(‘WP_HOME’,’http://127.0.0.3/blog’); // define(‘WP_SITEURL’,’http://127.0.0.3/blog’); define(‘FORCE_SSL_LOGIN’,false); define(‘FORCE_SSL_ADMIN’,false); in wp-config.php In order to be … Read more