Posts Tagged ‘redirects’

Posted on April 24th, 2015

Redirect Loop Installing WordPress on a Subdomain

Typically installing WordPress on a subdomain is no big deal. It’s a 10 minute process at most. However, today I needed to install it for a client’s test site and it would throw a Error 310 (net::ERR_TOO_MANY_REDIRECTS) — “This webpage has a redirect loop” or “The page isn’t redirecting properly” as soon as I pressed the “Install” button.

Read the full post…

Posted on January 27th, 2008

Redirect Only Specific Files from HTTP to HTTPS

I had a hard time finding a solution to redirect only certain files from HTTP to the secure HTTPS. I found all kinds of ways to redirect the entire site to HTTPS but none for specific pages only. After a few hours tinkering I found a solution using the following code in a .htaccess file:

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$$1 [r=301,nc]

rewritecond %{SERVER_PORT} !^443$
rewriterule ^filename.php(.*)$$1 [r=301]

The first part of the code redirects to as noted in an earlier post, “301” Redirects for SEO. The second part then redirects a specific file (filename.php) from http to https. Thus the individual file “filename.php” can only be accesses using a SSL connection.

Posted on January 4th, 2008

“301” Redirects for SEO

Search engines will often regard and as two different websites. Because of this, websites usually experience the effects of link fragmentation (inbound links point to both and others to For example, if has 5,000 inbound links and has 2,500 inbound links you could potentially combine them so you have all 7,500 links pointing to

To do this you can setup a permanent “301” redirect by creating a .htaccess file with the below code. This will ensure that all requests coming in to will get redirected to

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^ [nc]
rewriterule ^(.*)$$1 [r=301,nc]


  • The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)
  • REPLACE and with your actual domain name in the code above
  • This .htaccess redirection method only works on servers using the Apache Mod-Rewrite module

This “301” redirect method is also a great way to save money on SSL certificates. When the site always points to you only need to buy a single SSL certificate.