1

I recently moved a Wordpress blog from website.com/wordpress to help.website.com. Now I want to redirect the links to the old adress to the new adress.

I deleted everything from the /wordpress folder except the .htaccess. This file has the following code:

RedirectMatch 301 (.*) http://www.help.website.com$1

It redirects my old links but I don't know how to remove the /wordpress from them.

For example if I access website.com/wordpress/article-categories/example-article/ it sends me to help.website.com/wordpress/article-categories/example-article/, but I want to get to help.website.com/article-categories/example-article/ instead. How do I achieve this?

1 Answer 1

1

Try

RedirectMatch 301 ^/wordpress/(.*)$ http://www.help.website.com/$1

This will match the folder literally without capturing it.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. The code worked after I added a slash before $i: RedirectMatch 301 ^/wordpress/(.*)$ http://www.help.website.com/$1

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.