I tried to install Drupal 8.03 on a windows 7 64 bit server, with MySQL, Apache and PHP 7.03, using the default install procedure / script.

Drupal is only one of the applications on the website and that is probably different from what Drupal 8 seems to expect.

The website is like https:/www.mysite.nl and overall root folder is x:\myroot\homepage. Drupal, however, is installed in x:\myroot\homepage\drupal and it is supposed to be accessible via https:/www.mysite.nl/drupal.

Back to the installation. To a "certain" extend that seems(!) to work. That will say the install script runs and ends. But than I want to access Drupal and that does not work. I can not access any thing "page missing". Both the base folder and the base url is not what Drupal expects (e.g. Drupal generates https:\www.mysite.nl\xyz where that should be https:\www.mysite.nl\drupal\xyz and I can not change that (at least not from the UI which is not accessible, assuming there is a setting for that).

So drupal seems is completely lost, does not understand what its base url is and does not understand where the files are (both at least the url should be a question during installation!!!!!).

By the way I never really used other drupal versions, but from a last year test install my impression is that this problem did not exist in drupal 7.

I do not know how to solve this. Hope you can help and perhaps initiate a few corrections/extensions in Drupal 8.

1 Answer 1


Look for this code in the .htaccess file in the root of the Drupal site's filesystem:

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal

and remove the '#' from the beginning of the RewriteBase line. That should tell Apache/Drupal how to properly rewrite URLs for your case.

  • Thanks for your advice. I tried your suggestion by activate the line RewriteBase /drupal in the htaccess file. It was not sufficient to make things working. The url's seems to be OK now, but Drupal is still looking for the files at the wrong place I assume (http error 500). Apart from that I have some mixed feelings. IMHO we are using apache functionality to compensate for Drupal short comings. Perhaps I get it working this way, but it is IMHO more a workaround that the correct solution. Sincerely, Louis
    – Louis
    Feb 7, 2016 at 16:09
  • @Louis If you don't mind my saying, you've slightly misunderstood what's happening - needing to modify .htaccess for this purpose is actually a requirement of Apache, not Drupal. Any other PHP application that uses rewrite rules would have the same requirement, it's just how it works. The 500 error means either an error in Apache (commonly caused by invalid syntax in .htaccess), or a fatal PHP error; it's not a 404 so probably doesn't relate to a file not found. Check the server logs, they should contain the exact reason for the error, and you can go from there
    – Clive
    Feb 7, 2016 at 20:43
  • um, Not an expert in this regard, but using rewrites where the program could generate the correct url ... I do not know. In the php error log I found: Uncaught PHP Exception RuntimeException: "GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler." at \Drupal\vendor\guzzlehttp\guzzle\src\functions.php line 116 it is true I do forbid that. from the php.ini ; Whether to allow the treatment of URLs (like http:// or ftp://) as files. ;ORG allow_url_fopen = On ;20151002 on advise drupal closed for security reasons allow_url_fopen = Off
    – Louis
    Feb 8, 2016 at 4:00
  • @Louis Many CMS's that operate on Apache, including both WordPress and Joomla!, utilize rewrite rules, as that's generally the cleanest way of serving all pages on the site from an index.php at the root of the website, while still having user- and SEO-friendly URLs. Your last comment was a bit garbled, so I'm not sure I understood, but it looks like you're now seeing a different problem, related to a missing library or PHP setting?
    – hampercm
    Feb 8, 2016 at 15:23
  • Hello, I just tested if Drupal is running when accepting allow_url_open. The answer is, yes Drupal runs now. However, ...... I do agree with the previous Drupal advice (!), to block allow_url_open for security reasons ... So where drupal7 did not need that unsecure option activated, drupal8 do need it. At least at this moment.
    – Louis
    Feb 8, 2016 at 16:31

Your Answer

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

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