Wordpress LogoMany people use domain name forwarding or masking in order to present a professional image to their readers while being able to host their websites on shared or low-cost hosting. For example, if someone has a free website at www.geocities.com/samplewebsite, they may want to allow users to access it using a personalized domain name such as www.theirwebsite.com.

One option is to purchase a web hosting account from a hosting provider and associate that hosted account with the domain name of their choice. While this is a good option, it may not be the most cost-effective method, since some people may have many domain names, and would instead like to share one web hosting account across all those domains.

The solution to this is domain-name forwarding, which is essentially a simple frame page which hosts the original site within it. This service is usually provided free of charge by most domain name registrars with the purchase of a domain name. The end-user can then key in the more meaningful domain name, while the original domain name is loaded in the background.

However, if you were to host a site based on Wordpress / Joomla or a similar CMS based on the PHP/MySQL platform, you may encounter that you are unable to use the user login (and admin login) feature if you were to access your site from the forwarded domain name, but works fine if you were to login using the original domain name.

The reason for this is that Internet Explorer uses the address bar in the browser to set the cookie (and not the URL of the originating content), therefore causing the inability to login. I first faced this issue when I developed a site using Mambo a long time ago, and found a solution which worked. Since then, I have successfully implemented this in my other sites using Wordpress and Joomla.

If you are facing this same problem, I would like to share the solution with you, and this is what needs to be done. Open up wp-login.php (it should be in your Wordpress root folder), and just below line 9 (in Wordpress 2.x) – the line that says header(bla bla), put this line: header( “P3P: CP=CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE”);

What this does is that it adds a P3P Compact Privacy Policy to your site. Just by doing this, you should be up and running already, and nothing else needs to be done. However, if you need to know more about P3P or what this is doing in detail, let me refer you to the Mambo support page where I discovered this solution : http://forum.mamboserver.com/showthread.php?t=13076

All the best and do let me know if you need help with this workaround.