Community Forums

Discuss, share and get help from our community of friendly WHMCS users

Close
Login to Your Account
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2013
    Posts
    169

    Default Rewrite URLs for WHMCS

    Hi,

    We're stuck regarding our URL rewrites for the client area. We've been rewriting a lot of the URLs, but have run into one issue.
    We're using the following code to rewrite the URLs for tickets:
    Code:
    #Support
    RewriteRule ^tickets(/?)$ supporttickets.php?itemlimit=999999&thepage=help&subpage=support
    RewriteRule ^ticket/([0-9]+)/([A-Za-z0-9]+)(/?)$ viewticket.php?tid=$1&c=$2&thepage=help&subpage=support
    RewriteRule ^ticket/([0-9]+)/([A-Za-z0-9]+)/close$ viewticket.php?tid=$1&c=$2&closeticket=true&thepage=help&subpage=support
    When the customer closes a ticket, /close is added to the URL. However, the email that is sent to the customer regarding ticket responses contains the "default" URL - when they access that URL, you can't just add /close at the end.
    Is there something we can do in this case?

  2. #2
    Join Date
    Mar 2013
    Posts
    169

    Default Re: Rewrite URLs for WHMCS

    Anyone got an idea?

  3. #3
    Join Date
    Jul 2011
    Posts
    1,991

    Default Re: Rewrite URLs for WHMCS

    it's little easy to change ticket URLs sent to clients email, using ActionHooks like the one below you can reformat the URL of these tickets,
    all what you need is to check if the message is "Support Message", use $var['relid'] to get ticket information from DB and rebuild your URL as in website

    PHP Code:
    <?php

    add_hook
    ("EmailPreSend"1, function($vars){

    if (
    $vars['messagename']=="Support Ticket Reply"){
        
    $ticketid $vars['relid'];
        
        
    // get ticket ID and Code from DB
        
        
    return array("ticket_link" => "http://{your-website-url}/ticket/{ticketid}/{code}/");
    }

    });

Similar Threads

  1. How do I rewrite cart.php URLs?
    By itdungpt in forum Developer Corner
    Replies: 1
    Last Post: 04-02-16, 01:19 AM
  2. Nginx Rewrite WHMCS on SubFolder
    By anonprophet in forum Using WHMCS
    Replies: 1
    Last Post: 08-01-15, 09:05 PM
  3. Rewrite Rule for whmcs URL
    By vinaya in forum Using WHMCS
    Replies: 8
    Last Post: 02-25-15, 11:29 PM
  4. WHMCS KB SEO FRiendly Urls and IIS 8 and URL Rewrite
    By sahostking in forum Using WHMCS
    Replies: 3
    Last Post: 10-23-14, 02:41 PM

Posting Permissions

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