Drupal localhost redirecting to www.localhost.com

后端 未结 4 719
我在风中等你
我在风中等你 2021-01-06 01:57

I am working on a drupal site which I checked out (svn) to my localhost.

Now the problem is that when I go to:

http://www.site.com

4条回答
  •  抹茶落季
    2021-01-06 02:36

    From the drupal sites/default/settings.php file:

    /**
     * Base URL (optional).
     *
     * If you are experiencing issues with different site domains,
     * uncomment the Base URL statement below (remove the leading hash sign)
     * and fill in the absolute URL to your Drupal installation.
     *
     * You might also want to force users to use a given domain.
     * See the .htaccess file for more information.
     *
     * Examples:
     *   $base_url = 'http://www.example.com';
     *   $base_url = 'http://www.example.com:8888';
     *   $base_url = 'http://www.example.com/drupal';
     *   $base_url = 'https://www.example.com:8888/drupal';
     *
     * It is not allowed to have a trailing slash; Drupal will add it
     * for you.
     */
    # $base_url = 'http://www.example.com';  // NO trailing slash!
    

    Try setting $base_url = 'http://localhost/work/site';

提交回复
热议问题