RewriteRule in .htaccess not working for cURL

For some strange reason I have experienced on one server that the RewriteRule in .htaccess is not working for cURL via the command line. The fix has been to add a User-Agent line to the header of the cURL command, like this:

curl --head --header "User-Agent: blablabla" http://dragly.org/

I have no idea why this happens, but I was pointed to this solution in a forum which I forgot to bookmark. I hope this might help you out if you should run into the same problem.

Published by

Svenn-Arne Dragly

I'm a physicist and programmer, writing about the stuff I figure out as I go.

Leave a Reply