DennisHermannsen Posted March 20, 2017 Share Posted March 20, 2017 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: #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? 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted March 22, 2017 Author Share Posted March 22, 2017 Anyone got an idea? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 22, 2017 Share Posted March 22, 2017 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 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}/"); } }); 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.