1

I want to redirect example.com/recipes/signup?code=OLD277 to example.com/recipes-user/register How can I achieve it via htacces?

I tried the below code in .htaccess but its not working!

Redirect /recipes/signup?code=OLD277 http://example.com/recipes-user/register
2
  • If you visit http://example.com/recipes-user/register in browser, does it show correct page? Commented Sep 5, 2019 at 7:39
  • Yes it shows a registration page. @anubhava Commented Sep 5, 2019 at 7:49

1 Answer 1

1

You may use this rule as your topmost rule in site root .htaccess:

RewriteEngine On

RewriteCond %{THE_REQUEST} /recipes/signup\?code=OLD277\s [NC]
RewriteRule . /recipes-user/register? [R=301,L,NE]
Sign up to request clarification or add additional context in comments.

Comments

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.