I have a Drupal 7 site hosted under a subdirectory say http://example.com/drupal. I am using IIS and SQLSRV. But all the images could not be loaded on the site as these images pointing to http://example.com/sites/default/files... I have added $base_url in settings.php but .htaccess could not be recognised by IIS. When I try to import rules from .htaccess, it does not allow RewriteBase /drupal rule as it is not supported by IIS.

Please help me out in this scenario. What could be the equivalent rule of RewriteBase /drupal?

1 Answer 1


Okay, so problem is IIS does not understand our .htaccess file and has its own set of rewrite rules. If someone's facing broken images problem, best is to create an outbound rule which will add your subdirectory into the URL. something like "/sites/all/..." to be rewritten to "/drupal/sites/all/...".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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