Jump to content

2 whmcs in same domain


sokalsondha

Recommended Posts

hello community

i need a big favour from you. i have whmcs installed in http://mydomain.com but 3 days before i create a sub directory http://mydomain.com/billing/

its working fine. but my existing client still have the old invoice template which is generated all the time.

so what happened is they have email invoice with the invoice link http://mydomain.com/viewinvoice.php?id=xxxx

but now when they click it its showing viewinvoice.php not find in the server error 404 page..

 

i want to keep my whmcs in the subdirectory folder called billing.

 

but is there anyway i can use any hook or something so all my clients who have already invoice generated and got the invoice email if they click on the invoice link it will redirect to the new link like http://mydomain.com/billing/viewinvoice.php?id=xxxx

 

please someone help please

 

Link to comment
Share on other sites

33 minutes ago, sokalsondha said:

but is there anyway i can use any hook or something so all my clients who have already invoice generated and got the invoice email if they click on the invoice link it will redirect to the new link like http://mydomain.com/billing/viewinvoice.php?id=xxxx

that sounds more like a task for htaccess redirection rather than a hook - not least because if you've deleted the WHMCS install @ domain.com, then there wouldn't be a hook triggered.

RewriteEngine On
RewriteCond %{REQUEST_URI}  ^/viewinvoice\.php$
RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^(.*)$ http://mydomain.com/billing/viewinvoice.php?id=%1 [R=301,L]

also, don't forget to change your WHMCS System URL in General Settings to reflect that you've moved the install - as this will be used by the email templates.

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.

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