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?

  • 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? 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

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.

  • 2
    where would I add this rule?
    – Corey Hart
    Nov 10 '11 at 17:34
  • 2
    Add it to functions.php. Then go to Settings > Permalinks, and just hit the save button. Nov 11 '11 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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