.htaccess

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

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

Login to post comments

Is no-one of you using WWW redirection?

I need help.
I want to redirect all my sites to the URL version without the www. prefix.

Please, could someone post his .htaccess?

I search since 22 days for a solution (here, here, here and here) - it hurts me, because I got time, I want to start playing with Drupal, but can't, until I know it will work :(

10 comments

Shared hosting: Clean URLs not working for additional sites

Introduction

I just started my first multisite setup (on a shared hosting account).

The problem

Clean URLs work great for example.com/drupal.

11 comments · Read more
JohnForsythe's picture

Blocking spambots with .htaccess

I just wrote an article about using htaccess to block spambots and scrapers, thought it might be good to post here. In the article, I go over how to block access by user-agent, referrer, IP address, and a few other things.

4 comments
Syndicate content