I am trying to simulate GET request for my blog here http://www.botsvsbrowsers.com/SimulateUserAgent.asp.
It shows status OK
if the browser does not have www prefix in URL whereas it gives 403 forbidden when URL has www prefix.
What can be done so that i get status as OK with URL as http://myblog.com or http://www.myblog.com ?
This is how general settings in wordpress looks like
Also i have added below code to htaccess file.
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# www to non-www
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Kindly refer below screenshot.
URL : http://myblog.com (Request Status : OK)
URL : http://www.myblog.com (Request Status : Forbidden)
Give this a try: