Hi, I want to know that what should i do so that if someone visits my website with the link www.communityofrobots.com gets redirected to simply communityofrobots.com . Because of this my website users are experiencing some problems with login system. Website is powered by drupal 6.20. Thanks.
You need to edit .htaccess file located in drupal installation directory. How to make a Drupal site urls with or without www only
I edited the .htaccess file as per explained but still its not working I did this # 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} ^communityofrobots\.com$ [NC] RewriteRule ^(.*)$ http://communityofrobots.com/$1 [L,R=301] Code (markup):
Find following codes in .htaccess # 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] Code (markup): Change this this to: # 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\.communityofrobots\.com$ [NC] RewriteRule ^(.*)$ http://communityofrobots.com/$1 [L,R=301] Code (markup): This should work for you.
1) Check again .htaccess file 2) clear cache: Administrator >> Performance >> clear cache 3) Are you using any redirect module like Path redirect, Global Redirect??
Talk to the developer who developed it and get the issue resolved, you don't need to be a rocket scientist to solve things like that . may be some soul searching online might kick the problem in the butt .
@aap I tried all things but still not working. Actually i have not set the base url to my website address so i even tried with example.com but still its not working.
You need to adjust your nameserver settings. Add a wildcard lentry with * or simply make 2 separate entries. If you don't know how, PM me
If you have access to CPanel in уоur account, yоu mаy hаvе access tо the Simple DNS Zone Editor. You Ñan uÑ•e thÑ–s to create а nеw CNAME fоr the www record. Simply enter www Ñ–n the 'Name' box, аnd thеn уоur domain nаmе wÑ–th а full stop аt thе end (i.e. domain.com.au. ) Ñ–n thе CNAME box. Be aware thаt this change can take a few hours (up tо 48 Ñ–n ѕоme cases) to take effect. Otherwise, I'd recommend thаt уоu contact your hosting provider's support department to sее Ñ–f theу cаn rectify it for you.
Hi again, The redirection is working fine but only for the homepage. www.communityofrobots.com redirects to communityofrobots.com but www.communityofrobots.com/node/237 redirects to communityofrobots.com/index.php?q=node/237. Same goes for other nodes. Any solution ?
First step should be enable clean url in Drupal admin panel. I am scared, DNS redirect may work for homepage only.
Clean urls are already enabled.They are working perfectly normally but when a node gets redirected from www. then url is in the form of "?q"