+ Reply to Thread + Post New Thread
Results 1 to 2 of 2

Thread: mod rewrite for share a sale link

  1. #1
    Noobie
    Join Date
    Apr 2008
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default mod rewrite for share a sale link

    i'm trying to add a mod rewrite on wordpress for a shareasale link as an seo friendly link

    sample url

    Code:
    http://www.shareasale.com/m-pr.cfm?merchantID=12345&userID=54321&productID=987654321
    how do i go about it, i'm a complete n00b to htacess

  2. #2
    Registered Member chrissyboi's Avatar
    Join Date
    Dec 2010
    Location
    UK
    Posts
    93
    Thanks
    3
    Thanked 22 Times in 11 Posts

    Default

    Quote Originally Posted by stoned

    ;1595147
    i'm trying to add a mod rewrite on wordpress for a shareasale link as an seo friendly link

    sample url

    Code:
    http://www.shareasale.com/m-pr.cfm?merchantID=12345&userID=54321&productID=987654321
    how do i go about it, i'm a complete n00b to htacess


    you looking for something like this?

    Code:
    redirect 301 /seo-friendly-url http://www.shareasale.com/m-pr.cfm?merchantID=12345&userID=54321&productID=987654321


    ---------- Post added at 11:54 PM ---------- Previous post was at 11:24 PM ----------

    Just a note to the above --

    I assume you are basically trying to achieve masking your affiliate url so the user doesn't see some long ugly affiliate link but instead sees a nice friendly url.

    You'll be aware that wp has it's own custom permalink structure, which just basically rewrites the ugly wp urls into nice seo friendly ones, and I assume you are using that feature. If you are not using that feature then goto settings > permalinks
    then check 'custom structure'.
    then insert this code:
    Code:
    /%category%/%postname%/
    then hit savechanges

    In your wp admin create a dummy page for your affiliate link page - can be anything really, just give the page the seo-friendly name that you want to achieve.

    then save the page.

    Then add the 301 code I gave you above to your htaccess file and make sure to change appropriate parts of it.
    Also, if you use hierarchy or category structure then make sure to include the structure for your seo friendly url in the htaccess file. The code in my first post assumes no hierarchy or category structure, the link below assumes there is such a structure:

    Code:
    redirect 301 /uncategorised/seo-friendly-url/ http://www.shareasale.com/m-pr.cfm?merchantID=12345&userID=54321&productID=987654321
    remember to have a '/' at the beginning and end of your seo friendly url structure and do not include your domain name in the seo friendly link - ie don't do this:

    Code:
    redirect 301 http://yourblogsite/seo-friendly-url/ http://affiliateurl

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts