Im trying to add a redirect to my site from one page to annother using the .htaccess file. From the documentation at http://drupal.org/node/38960 I tried the following but it doesnt appear to do anything. Thanks

# RewriteBase /

#custom redirects (this is where the code ive added begins) 

RewriteRule http://mysite.com/one http://mysite.com/two [R=301,L]

#end custom redirects (this is where the code ive added ends)

# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  • Let the redirect module do it for you... drupal.org/project/redirect – Alex Gill Jul 2 '12 at 14:14
  • The module works when I do a test and redirect from mysite.com/a to mysite.com/b (neither are real pages). However it doenst work when I try to override a taxonomy path which what i need to do. Thanks – Evanss Jul 2 '12 at 14:23
  • Incase its of interest the path is: taxonomy/term/6%207%208%209 – Evanss Jul 2 '12 at 14:24

In the end the issue was spaces in the url. Working with this:

# RewriteBase /

RewriteRule ^taxonomy\/term\/6\ 7\ 8\ 9$ /taxonomy/term/all [L,R=301]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.