I am using a 301 redirect to redirect a page to another page in the same website, which uses RewriteRule
to hide the PHP variables in a friendly URL.
My redirection code in .htaccess:
Redirect 301 /example/word1/word2/word3 http://www.example.com/word1/word2
As a result when I visit /word1/word2/word3
it redirects me to the URL set by a previous RewriteRule which is /word1/word2?var1=word1&var2=word2&var3=word3
. Where var1, var2, and var3 are the PHP variables that have for content word1, word2 and word3.
I want the redirection to go just to www.example.com/word1/word2