I recently added a Wordpress blog to a client website. I create a subdirectory and install Wordpress there. Everything worked fine until I added the .htaccess file to the root directory.
RewriteEngine on
rewritecond %{http_host} ^websitename.com [nc]
rewriterule ^(.*)$ http://www.websitename.com/$1 [r=301,nc]
Now when I click on the blog link, I get the following error
The webpage at http://websitename.com/blog/ has resulted in too many redirects.
Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with
your computer.
Does anyone know how to solve this problem? I am not at all familiar with .htaccess.
Edit: Just to be clear, 301 redirect works just fine for all pages except the blog folder. If you type websitename.com, you will go to www.websitename.com. However, if you type websitename.com/blog, you will encounter this error. The blog in this example points to a Wordpress folder.
source
share