Jump to content
sokalsondha

2 whmcs in same domain

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

 

Share this post


Link to post
Share on other sites

With .htaccess. The code below should work but keep in mind that I suck at htaccess ☹️

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/viewinvoice.php$
RewriteRule ^ /REPLACE_WITH_YOUR_DIRECTORY/viewinvoice.php [R=301,L]

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By ronelgon
      Hello,
      Firstly, sorry to disturb you members but I need some help with WHMCS.
      When I to go http://mydomain.com/whmcs, it says:
      Welcome to WHMCS!
      Before you can begin using WHMCS you need to perform the installation procedure. Click here to begin...
      I've made no changes in the files/SQL. I got this issue automatically when opening frontend today.
      Even WHMCS Admin shows the same error. I have been using WHMCS for the last 3years without any problem
      Any ideas?
       
      In some forum topic, some one talked about Wordpress .htaccess conflicting with WHMCS and deleted wordpress installation but still not changed.
       
      Your help will be highly appreciated
       
      Thank you
      Ronnie
    • By nzcam
      Hello,
       
      Im looking to purchase WHMCS, but i have a few questions. Firstly, here is my plan.
      I want to use Solus VM. Wordpress (mega host theme) and WHMCS, WHMCS Bridge module and the WHMCS SolusVM module.
       
      i guess my key question is,
      Can WHMCS be on the same server?
      If so, do I install Wordpress first and then install WHMCS into a separate folder ?
       
      are there any complications when moving to new versions by having them on the same box?
       
      Cheers
       
       
      Cam
    • By hemantpapneja
      Hi I am Having an issue with WHMCS 7.1
       
      Hi
       
      I did an installation of whmcs on my LINUX server.
      Everything worked fine and then I Loged out ang after some time when i open the URL It shows this
       
      "Welcome to WHMCS!
      Before you can begin using WHMCS you need to perform the installation procedure."
      I am clueless at the moment and your help will be greatly appreciated.
       
      Every time I upload the configuration.php file it got deleted every time i logout and login after 1 hour.
      please help me ASAp as i am facing too much problem
  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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