WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm doing a bit of AB testing, and am looking for a way to point multiple endpoints to the same page in wordpress. My site is using wordpress as it's CMS tool.


I want the above URL's to point to the about page generated through wordpress


The specific use case is to track hits through google analytics. I've tried doing 301 redirects, but searching through referrers for your site doesn't always work. Any idea's?

share|improve this question
A custom permalink rewrite will work for you. Do you want all the urls ending with link<xyz> to point to the same about page, and always? – Rutwick Gangurde Nov 9 '11 at 5:07
How would you go about doing that? I already have a custom permalink setting in the admin page. And yes, always point to the about page content, but keep the link<xyz> path – Corey Hart Nov 9 '11 at 18:28
up vote 3 down vote accepted

Okay... here's how you add the rule.

    add_action('init', 'add_my_rule');

    function add_my_rule()

This rule will ensure that when you visit a url like http://.../test/link or http://.../test/link<xyz>, you are redirected to the about page (please make sure the slug for about page is 'about'). Also, http://.../test/, will take you the test page and not the about page.

Let me know if this works for you.

share|improve this answer
where would I add this rule? – Corey Hart Nov 10 '11 at 17:34
Add it to functions.php. Then go to Settings > Permalinks, and just hit the save button. – Rutwick Gangurde Nov 11 '11 at 2:48
...works, thanks – Corey Hart Nov 13 '11 at 6:52
Great! You're welcome! – Rutwick Gangurde Nov 13 '11 at 14:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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