Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I would like to redirect:

http://www.mydomain.com/articles/experience

to

http://www.mydomain.com/experience

And I would like to redirect too, from this:

http://www.mydomain.com/articles/whatever

to:

http://www.mydomain.com/en/articles/whatever

How can I do it with .htaccess?

Thanks.

share|improve this question

closed as off topic by toscho Mar 3 at 21:18

Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

up vote 1 down vote accepted

This is off topic on WordPress Stack Exchange, and you don’t need mod_rewrite for that. A simple RedirectMatch is enough:

RedirectMatch Permanent ^/articles$ http://example.com/en/articles
share|improve this answer
It doesn't work :( – Mike Mar 4 at 12:57
@Mike See my update. Try to use the full domain. – toscho Mar 4 at 13:05
But I only want to redirect /articles, not /articles/whatever/ – Mike Mar 4 at 16:20
Then add an $. See my update. – toscho Mar 4 at 16:37
Sorry. Look at my update. – Mike Mar 4 at 16:46
show 1 more comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.