0

I've seen a few sites, not necissarily Drupal sites, in which the menu links, are without www. (that is the Cname DNS record).

Drupal 7 shortens links from http://www.barackobama.com to be www.barackobama.com

I am asking if it is possible to create links without the Cname even, I.E that the final result would be:

barackobama.com

Can be done from inside the Drupal GUI? If not, please at least example how will you do so from the .htaccess file?

2

No, this is something that is been handle at the server or DNS level. From the GUI, you do not have control of where you application (Drupal) can will run.

If you are running Apache you can add this code to your .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^your-site.com [NC]
RewriteRule ^(.*)$ http://www.your-site.com/$1 [L,R=301]

Source: Force drupal 7 to place "www" in front of urls

  • How will you do so from the .htaccess (Hope it's okay by you, that I ask here to expand your answer with that data)... – JohnDoea Feb 20 '16 at 19:57
  • 1
    Benia, I have added the information on how to do it from the .htaccess. – itsdarrylnorris Feb 22 '16 at 17:47

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.