wordpress get request redirection

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.

Read More

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
enter image description here

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)
enter image description here

URL : http://www.myblog.com (Request Status : Forbidden)
enter image description here

Related posts

Leave a Reply

1 comment