Posts Tagged ‘.htaccess’
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 October 21st, 2010
406 Error Fix
Are you or others receiving a 406 error when visiting your site? Most likely it is caused by mod_security, which acts as a firewall to protect web application attacks.
The solution maybe as-easy-as adding the following to your .htaccess
file in-order to disable mod_security:
SecFilterEngine Off SecFilterScanPOST Off
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} ^example.com [nc] rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc] rewritecond %{SERVER_PORT} !^443$ rewriterule ^filename.php(.*)$ https://www.example.com/filename.php$1 [r=301]
The first part of the code redirects example.com to www.example.com 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.