I have developed site on localhost in XAMPP, in the folder C:\xampp\htdocs\drupLC

Then everything uploaded to the server.

And now all (or many of them) hyperlinks looks like


example.com/drupLC/admin (etc).

How can I get rid of drupLC from all hyperlinks? Because my site is not usable.

  • Hi @lyborko, welcome to Drupal Answers. Could you improve your question by tagging it with the Drupal core version you're using, and include where exactly these urls are stored. Are they in the body field, possibly added by a Wysiwyg editor, or in link fields, or some other way? Thanks! Jan 31, 2017 at 20:52
  • @WimMostrey I do not know how to re-tag this post. I am using Drupal 8.2.5. When I logged in like admin, then on the tool bar were links like example.com/drupLC/admin/content and so on. It seems, that it is ok for the guest, but for admin it is broken. Administrative backend is affected
    – lyborko
    Jan 31, 2017 at 21:03

1 Answer 1


You may need to:

  1. Check the setting for RewriteBase in .htaccess (e.g make RewriteBase /)
  2. Check the $base_url setting is correct (Should be automatic in D8).

  3. Clear all caches ( Admin > Config > Development > Performance > Clear cache )

If you have inline links in body content with incorrect URLs, that's a different story, but the above may help with the standard stuff.

  • David thanks for helping me. But there is no RewriteBase in .htaccess. C:\xampp\htdocs\drupLC\.htaccess and also not in : C:\xampp\htdocs\drupLC\sites\default\files\.htaccess There is no $base_url in C:\xampp\htdocs\drupLC\sites\default\settings.php I do not know neither how to clear all cache. Because Drupal wins over my patience. Nothing works like should. I try to add RewriteBase / somewhere. By the way: I checked database for occurence "drupLC" and I have found hundreds hits in cache tables. This is what you mean?
    – lyborko
    Jan 31, 2017 at 22:13
  • I searched localhost, while I uploaded these files recently.
    – lyborko
    Jan 31, 2017 at 22:17
  • RewriteBase is in the default D8 .htaccess file. If using Apache, check you have that file github.com/drupal/drupal/blob/8.4.x/.htaccess#L119 maybe it wasn't uploaded, or has been rewritten by your host. Answer updated for cache clear. Jan 31, 2017 at 22:19
  • OK. I uncommented #RewriteBase /, and I have RewriteBase / only. Uploaded .htaccess, reloaded site, but nothing significant happened. Should I empty all tables with the name cashe? watchdog is full of drupLC too... wait I see your edits...
    – lyborko
    Jan 31, 2017 at 22:29
  • Clear the caches as well, might just be that admin > config > development > performance Jan 31, 2017 at 22:44

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.