UPDATE: Solved. The hosting environment was OK and the test result was wrong. See bug report at http://drupal.org/node/1178850.
I'm really close to having my first ever Drupal site ready to go live. Excitement!
But I am having a puzzle over Clean URLs, possibly connected with using an addon domain.
I developed my site offline and Clean URLs were working on my local machine. This is Drupal 7 on Apache on Linux.
My online hosting is at Compila and the Drupal site is going to be on an addon domain, call it www.addon-domain-example.co.uk. (I.e. the real address is gonna be like www.main-domain-example.co.uk/hiddendirectory and then the addon domain points to that.)
Before trying to upload my real site, I did a clean Drupal 7 install in a different subdirectory - www.main-domain-example.co.uk/trialdirectory - just to see if everything was basically working together OK. On that trial install, Clean URLs work - they still work now.
However, on my real site, they don't. It doesn't seem to matter whether I access it via www.addon-domain-example.co.uk or via www.main-domain-example.co.uk/hiddendirectory/ . It doesn't seem to matter either whether the addon domain forwarding (or whatever you call it) is active or not - I can delete the addon domain via cpanel and it doesn't help.
If I go to the enable clean URLs (overlay) page, I just get the explanation and the button "Run the Clean URLs test". And if I click the button, it "thinks for a bit" and then gives me the same again. I seem to recall this is what the dev site did when Apache on my machine didn't yet have the right modules, so I think it basically means "Test failed".
Because the trial install worked OK, I don't see how it can be something lacking at the hosting.
I started off with the default .htaccess that Drupal 7 installed. So that worked OK on my machine and on the trial site.
I'm aware that the real site has hard-coded "www.addon-domain-example.co.uk"s here and there, so it is significantly different in that way from the trial. And that's where my suspicions have gone. But it could be something else.
I subsequently found http://drupal.org/node/1028568#comment-3997076 and I tried making a .htaccess file with the line replacement suggested there,
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
but that didn't seem to make any difference.
(I don't know what that actually means or why it would maybe help, I was just trying it.)
Thanks in advance