0

I am using drush archive to copy a live site to a test environment. The test environment is on my local machine, the live site is on a hosted platform.

The arr command seems to complete successfully and the new database config is correctly appended to settings.php, the files are all restored to the appropriate directory on my local machine and the database is created and populated. So far, so good.

If I navigate to the default page http://localhost/~drew/site2, the home page is displayed, but it is clear that the CSS is from my theme is not available - I think that this is because the CSS was compressed and cached on the live site, so I can probably ignore that for now. If however, I try and navigate to any other page, I get an HTTP 404 saying localhost://~drew/site2/index.php not found yet when I check the filesystem, it's definitely there, and the web server can clearly see it because it created the home page earlier when I navigated to the default page.

I do use pathauto and have set explicit path names for my pages on the live site - could this be broken in some way when restored?

Thanks

1
  • Update: I think it has something to do with the way Mac OS X and apache handle the ~drew construct. The full path for ~drew resolves to /Users/drew and that is where the site2 directory exists. However, machine level sites are to be found in /Library/WebServer/Documents and it appears that when the ~drew gets converted to /Users/drew, apache then starts to look for documents in /Library/WebServer/Documents/Users/drew
    – drew
    Feb 11 '13 at 14:52
0

I think you problem is likely that you need to set the RewriteBase in the .htaccess file. Edit your .htaccess, find the line that looks like

# RewriteBase /

And add a line under it that reads

RewriteBase /~drew/site2

then clear Drupal caches, and try your site.

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.