301 redirect is working for www.example.com but not for ....

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
pmarreddy's picture

I am getting a strange problem with 301 redirect it the code is working for with www in the link and not working for with out www

RewriteBase /
RewriteRule ^api$ http://example.com/topic/api [R=301,L]

if i type http://www.example.com/api it works but if i do http://example.com/api it doesnt work \

Adv thanks
prasanth
http://learna2z.com

Comments

check the dns

eaochoac's picture

Check your dns settings maybe one a record (with www) is pointing to A and the other to B

Search Engine Optimization (SEO)

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week