views:

175

answers:

2

i am trying to redirect an url from location a to b using .htaccess with the following code

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

it is not working

i have this turned on

RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
   RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
+2  A: 

I think you're right: that won't work. Use http://drupal.org/project/path%5Fredirect instead.

tog22
A: 

Try:

RewriteCond %{REQUEST_URI} ^/accessibility$ [NC]
RewriteRule ^(.*)$ http://example.com/topic/$1 [L,R=301]

BTW, mod_rewrite related questions are better asked on serverfault.com, so don't be surprised if a moderator migrates this question over there.

Henrik Opel