I'm running into an issue where 301 redirects on site I switched from Joomla to EE are not working. The link style on the old version of the site is:


For the redirect, I'm using this line in the .htaccess:

Redirect 301 /index.php?option=com_user&view=reset&Itemid=14 /contact

Since index.php is valid with EE, my assumption is the issue revolves around the query string since a more basic redirect works as indended:

Redirect 301 /about /

routes traffic from the about page to the home page.

How can I redirect these links to the new ExpressionEngine-powered pages or, if the issue is more generic, links containing "index.php?"?

1 Answer 1


You need to use %{QUERY_STRING}

RewriteCond %{QUERY_STRING} ^option=com_user&view=reset&Itemid=14$
RewriteRule ^(.*) /contact? [L,R=301]
  • That was 99.99998% there! It should be /contact? [L,R=301] otherwise the option=... bit is appended to the redirected URL. Jun 15, 2014 at 5:18
  • Thanks for your help, Max! Not quite wrapping my head around the ? being necessary... my understanding is that means what directly proceeds it can be optional but in this case, it seems to impact what comes after? Jun 15, 2014 at 19:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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