0

I want to change my domain name from reallylongandnotuserfriendly.example.com to you.example.com.

Is there a setting that could expose these change to the public, without actually changing the real domain name?

2 Answers 2

2

You could create a Drupal alias as follows:

  1. In the sites directory, find and rename the example.sites.php file to sites.php
  2. Add the following line

    $sites['you.example.com'] = 'name_of_the_directory_where_your_settings.php_is';
    

In your case, the settings.php file is likely to be inside sites in a directory called reallylongandnotuserfriendly.example.com, which means the line would be:

$site['you.example.com'] = 'reallylongandnotuserfriendly.example.com';

Just be sure that you configure your server to point you.example.com to your base Drupal installation.

0
0
  1. Open the setting.php file
  2. Find $base_url in that file
  3. Change the value of $base_url

change the file permissions for that file, since by default it is a read-only file.

5
  • Isn't that actually changing the domain name? Or is it just "redirecting"?
    – Flying
    Commented Nov 23, 2015 at 11:49
  • you asking change base url.can you explain little more ?? Commented Nov 23, 2015 at 11:50
  • I am looking for an easy way to change the display of links, without actually changing anything. Meaning that both old.example.com and new.example.com would go to the same place, but only new.example.com is exposed
    – Flying
    Commented Nov 23, 2015 at 11:53
  • then you need to create custom module for that Commented Nov 23, 2015 at 11:56
  • Sorry that it is unclear, but that was sort of what I thought I was asking about...
    – Flying
    Commented Nov 23, 2015 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.