Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was googling all over the pages, trying to find what could be wrong before trying to contact the developers at tools.pingdom.com, gtmetrix.com, juxseo.com, and other sites.

Since I have changed my .htaccess file to handle the 301 redirection, forwarding mydomain.com to www.mydomain.com, those web tools do not work proper anymore.

Here is my .htaccess of my php application hosted at cpanel.

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti* */robots* */oc-admin*

<Limit GET POST>
order deny,allow
deny from all
allow from all
order deny,allow
deny from all

AuthName mydomain.com
AuthUserFile /host/mycpanelusername/public_html/_vti_pvt/service.pwd
AuthGroupFile /host/mycpanelusername/public_html/_vti_pvt/service.grp

RewriteEngine On
RewriteBase /~mybasefolder/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~mybasefolder/index.php [L]

#maybe this is causing issues to pingdom.com
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\/" [R=301,L]

#set the charset and not in html (a best practice)
AddDefaultCharset utf-8

So, anyone maybe could give me a clue?

here is the pingdom result after adding the Rewrite statements

enter image description here

share|improve this question

migrated from webapps.stackexchange.com Dec 29 '12 at 17:07

This question came from our site for power users of web applications.

up vote 1 down vote accepted

A 301 redirect should not normally cause pingdom any problems. If it encounters a redirect this should just appear as an additional step in its report.

#maybe this is causing issues to pingdom.com
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^/?$ "http\:\/\/www\.mydomain\.com\/" [R=301,L]

However, it looks like there is a problem with your redirect. I can't see how this can work... it looks like all requests for mydomain.com (regardless of the URL) would get redirected to your www.mydomain.com homepage?!

Your .htaccess should read something like:

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

The $1 appends the original URL that is requested.

I would also put this above your internal rewrites. (But after your RewriteEngine on)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.