Hello,
I am a newbie of drupal world, but I have a lot of experience with code developing.
I received a site made with Drupal 7.34, but I have some issues to run it in localhost (under apache).
All default links are correct, but the links created with custom module have a link without full path.
I installed drupal in /lampp/htdocs/drupal and the correct links have included all path (eg.: http://localhost/drupal/user). Corrupted links, instead, have this path: http://localhost/custom_user instead of http://localhost/drupal/custom_user. The same thingis for the custom images.
I've seen this type of contents are stored in DB. Is there a way to automatically add "drupal" suffix to links while I am in developing mode (under localhost)?
Thanks.

Comments

Jaypan’s picture

The easiest way to do that is to create a local sub-domain that matches your remote domain in depth.

bander2’s picture

You might try fiddling with the base url in your settings.php file or the RewriteBase. In my opinion though you really have 2 options:

  1. Fix whatever issue is causing the inconsistency in the custom module.
  2. Make your development environment more closely resemble your production environment. Serving your dev site in a sub folder is a pretty minor difference, but it can cause these problems. It can be easily fixed by changing the document root in your apache configuration file.

Ideally both.

- Brendan

VM’s picture