I have a strange issue: I have a drupal 8 instance on a subfolder in /var/www, I have enabled mod-rewrite in apache, I changed the apache.config file as in this post and the clean urls are working if I navigate directly to /drupal/admin for example.

I also added the RewriteBase /drupal in my .htaccess file.

The problem is that any link generated by drupal still contains the /drupal/index.php/ part and I don't know how to get rid of that /index.php part.

I worked with Drupal 7 since it was launched but I never had this problem.

Is there a setting somewhere in db or in the config file where I should 'tell' drupal to use clean urls?

My server runs Apache 2.4.7 and PHP 5.5.

Thank you.


If you didn't append /index.php to the base URL (e.g. setting $base_url to http://example.com/index.php, in the settings.php file), then the rewrite rules in the Apache configuration files are wrongly adding /index.php to your links.
Check both of them, and you should find what is causing the wrong behavior.

  • Hi i have the same problem and checked the settings.php file there is nothing which sets base_url path. So maybe its a problem of my host? I wonder because some links are standard without the "index.php" and some are with. How is this possible? – lolhonk Sep 24 '16 at 10:17
  • To me the clean URLs which are autodetected in drupal 8 in every request as seen [here]: drupal.org/node/1659580 gave me the same impression ... – GiorgosK Feb 24 '17 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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