php redirect / WordPress

The customer had an old non-wordpress site which had a folder called rsvp which did a redirect to a page in the old site.

In the new WordPress site, the equivalent location is this:

So in the folder rsvp  on the server I put this index.php

// redirect to new Rain1 WordPress site RSVP page

There is an htaccess page that (purposely) has this:

ErrorDocument 404

If I go to, I get the new site main page, NOT the desired page.


What is the correct way to do this?

Richard KortsBusiness Owner / Chief DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
Where is the .htaccess file with the WordPress rewrite rules located?
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
At the root,

Jason C. LevineDon't talk to me.Commented:
At the root

So that's why it doesn't work.  The WordPress rewrite rules are firing on /rsvp/ and that generates a 404 error since there is not a matching WordPress page/post with that slug.  It never gets past that point and into your index page with the header command.

Edit .htaccess and add the following line above the WordPress rewrite block:

Redirect 301 /rsvp/

Open in new window

As long as that is above the WordPress rewrites, it should send users to the correct place.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard KortsBusiness Owner / Chief DeveloperAuthor Commented:
Perfect. I thought it would involve a change to .htaccess.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.