2

We're having a problem (well, a series of problems actually, but this one appears more difficult to solve) moving a clients site to a new domain on the same server / hosting account.

The site is moving to another folder hosted on the same server, so should be no need to change database settings or move the database.

We've moved all the files to the new sub directory and the problem is that whilst the home page displays fine, none of the other pages appear to exist and none of the menu links work. Base URL isn't specified in the settings file (although we've tried specifying one which didn't help).

Any ideas?

EDIT: Changing .htaccess file isn't helping

3

Check your .htaccess

Open your htaccess and modify line 94 to match your needs.

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  RewriteBase /YOUR-FOLDER-NAME
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

If this not work the problem is with your cache tables or custom code in template.php or in .module files

To clear cache tables you can try

drush cc all

OR Try this in phpMyAdmin or mysql console.

TRUNCATE `cache`;
TRUNCATE `cache_block`;
TRUNCATE `cache_bootstrap`;
TRUNCATE `cache_field`;
TRUNCATE `cache_filter`;
TRUNCATE `cache_form`;
TRUNCATE `cache_image`;
TRUNCATE `cache_libraries`;
TRUNCATE `cache_menu`;
TRUNCATE `cache_page`;
TRUNCATE `cache_path`;
TRUNCATE `cache_rules`;
TRUNCATE `cache_token`;
TRUNCATE `cache_views`;
TRUNCATE `cache_views_data`;

Make sure you include all tables starting with CACHE_

More info here Can any of the cache_* be emptied safely?

  • No luck. We've tried editing the .htaccess in the public_html directory and we've tried adding files to the subfolder that holds files for this domain, neither work. Again, the home page displays fine but all links are giving 404 error. – JamiePatt Feb 5 '13 at 0:36
  • @InfluenceJamie see my edit. – niksmac Feb 5 '13 at 2:54
  • Hey, we solved the problem, turns out it was to do with some corrupt files in one of the system modules. Thanks for your help. – JamiePatt Feb 5 '13 at 3:14
1

Is override all set in your apache config? If not this may stop your .htaccess files from being processed.

Try yoursite.com/index.php?q=uri/of/a/path/that/should/exist

instead of

yoursite.com/uri/of/a/path/that/should/exist

to test.

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.