Jump to content

Friendly URLs for Link Tracking


Keith

Recommended Posts

I tried to post this in the Tips/Tricks forum but I don't have permissions to start a new thread there. If a mod want's to move this over to that forum, cool.

 

I was trying to add my homepage link to a site I'm on using a link tracking URL "site.com/whmcs/link.php?id=12" but they didn't allow the "?" character.

 

So I decided to set up friendly URLs for link tracking so that I could enter it in the format of "site.com/whmcs/link/12".

 

Just open the .htaccess that's in your root installation folder and add this code:

# Link Tracking
RewriteRule ^link/([0-9]+)$ ./link.php?id=$1 [L,NC]

 

There you go. Now you can access any link tracking URL by using:

yoursite.com/(whmcs_install_folder)/link/(id_of_link_tracking_url)

 

Hope this will help someone out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated