1

I want to do permanent redirect using htaccess. For eg :- I want to redirect /modules/pages/?pageid=7 to http://www.xxx.com/aaa/.

This is what i have done Redirect permanent /modules/pages/?pageid=7 http://www.xxx.com/aaa/ but it gives me 404 error.

1

1 Answer 1

2

Try in you .htaccess, placing this above your wordpress rules (just under RewriteEngine On:

RewriteCond %{QUERY_STRING} ^pageid=7$
RewriteRule ^modules/pages/$ http://www.xxx.com/aaa/ [R=301,L]

Mod_alias's Redirect won't match against query strings.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.