I've been working on a drupal website in a server for months but after moving it to another server and url some of the files are not read. for example it seems that it does not read colors.css or all of the image files used in the site.

for more clarification I must add that there is a joomla site on www.example.com then I've put my drupal site on www.example.com/test this is the site which does not work properly.

and before that it had been working on www.something.com/test/test1.

I don't have a clue why it has happend! help

  • Do you have any errors or warnings on the status report page (admin/reports/status)? – rooby May 3 '15 at 13:27
  • Also grep /test/test1 in the site folder to see if any code is using such path. You can check this in Mysqldump output also – AgA May 3 '15 at 14:20
  • give us more details – M a m a D May 3 '15 at 14:22
  • rooby I can not login because when I enter username and password and click on the login bottom I redirect to the front page of www.example.com but my site is on www.example.com/test. at the end I won't log in! – shekoufeh May 4 '15 at 3:47
  • @AgA as I am watching my html code by inspect element all the paths are true! I mean it is reading for example images from a valid directory in both sites! just some charachteres at the end are different! for example the first site add ?nnrvgq but the second one add ?nn8ugb to the end of file paths. I add this detail for @Drupalist too. – shekoufeh May 4 '15 at 3:57

check the sites/default/settings.php for $base_url

it might have been set for a sub-directory install, and may still reflect the original server location.

if it wasn't set originally, setting it now may help as well.

|improve this answer|||||
  • you mean that I must set $base_url to the www.example.com/test url? it is in comment line now! – shekoufeh May 4 '15 at 4:05
  • Im not saying you have to do anything, but that could be causing the problem - the $base_url sets the base folder for the installation - it is very common to need to set this in an installation found in a sub-folder (like /test in your case). don't forget to clear the cache after – Geoff May 4 '15 at 4:09

default files permission was making problem. It's permission must be 755. that was all!

|improve this answer|||||

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.