Hello,

Strange issue... When I visit my site with www.mysite.com (instead of just mysite.com), the View/Edit/etc links are not displayed on any of the nodes/content items. Any idea what would cause that and how I can fix it?

Thanks!

Comments

ayesh’s picture

You will see that in www version, you are not logged in.

There are many ways to overcome this. Setting cookie domain and a www redirect will solve this.

sadashiv’s picture

You can make use of configuration in .htaccess file of drupal

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

Else you can create a setting in the vhost in apache or httpd as

<VirtualHost 192.168.2.1:80>   //your ip address
     ServerAdmin abc@xyz.com //your email
     ServerName mysite.com
     ServerAlias www.mysite.com
     DocumentRoot /var/www/mysite
<Directory "/var/www/mysite">
allow from all
Options +Indexes
</Directory>
     ErrorLog /var/www/logs/error.log
     CustomLog /var/www/logs/access.log combined
</VirtualHost>