0

I just moved everything from my remote Drupal site to localhost (C:\xampp\htdocs\folder). All links (content images, menu links) are shown like http://localhost/sites/default/files/inline-images/magento.png when it should be http://localhost/foldername/sites/default/files/inline-images/magento.png.

Is there any quick method I can use to fix this problem like using mod_rewrite?

6
  • Try by uncommenting the "RewriteBase" in your .htaccess file and replace with the your project "foldername"
    – Manikandan
    Commented Nov 7, 2016 at 10:13
  • i had tried, RewriteBase /foldername or RewriteBase /foldername/ or RewriteBase foldername, all useless
    – hkguile
    Commented Nov 7, 2016 at 10:19
  • i don't know why the uploaded image url is /sites/default/files/inline-images/magento.png but not sites/default/files/inline-images/magento.png, the image will be displayed if the slash is gone.
    – hkguile
    Commented Nov 7, 2016 at 10:23
  • I think there is some issue with apache finding your Document Root folder. Are your running your site by setting up Virtual host name or with normal way like localhost/projectname?
    – Manikandan
    Commented Nov 7, 2016 at 10:28
  • the localhost i'm running xampp localhost/projectname
    – hkguile
    Commented Nov 7, 2016 at 10:36

2 Answers 2

0

If the RewriteBase Method is not working and every other page works, try to set the $base_url variable in your settings.php file to your folder.

1
  • i'm using drupal 8
    – hkguile
    Commented Nov 7, 2016 at 10:35
0

You can try with pathologic module for solving image url issue

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.