Jump to content
  • 0

Blesta In Subdirectory Breaking Url Tags?


Brashquido

Question

Hi All,

 

I have been notified by a client that the payment URL for a new service they subscribed to was returning a 404 error. Upon reviewing the email that was delivered to them I noticed that the sub directory that Blesta was installed into was not being included in the {client_url} or {payment_url} tags (haven't checked others. Manually entering this sub directory into the URL in the browser resolves the issue.

 

Is this something that needs to be updated in Blesta, or would I need to add this sub directory information to my URL Rewrite rules in IIS?

 

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

The cron is run via CLI, so Apache does not handle the request, and your virtual directories are not known. The virtual directory aliasing only occurs with Apache, so you should either remove the virtual directory aliasing to Blesta's directory so the path can be determined correctly via CLI, or run the cron via wget so that it will use Apache instead.

 

If you opt to remove the alias to Blesta (i.e. rename the 'blesta' directory to 'services') and you get a 'license invalid' page when you try to login, then you just need to reissue your license key. To do this, log into your account, click to manage the service, check the 'Reissue' checkbox and save. Then the license will revalidate at the new location when you login to your installation.

Link to comment
Share on other sites

  • 0

Ok, so I updated the "Root Web Directory" so that it pointed to the root of the website under which Blesta is installed rather than to the Blesta sub directory itself. I created a test invoice and waited for cron to run and could see the URL was updated in the email. Problem is I am using Virtual Directories in IIS, so the physical path (as per file system) is different to that of the path presented by the web server. For example, my physical path to the client area is;

 

http://my.domain.com/blesta/client/

 

However, using Virtual Directories this is displayed as;

 

http://my.domain.com/services/client/

 

I do this so that I can use program/application names for directories on the filesystem and have something more reflective of their function in the URL presented by the web server.

 

So I guess the real question is can Blesta be used with Virtual Directories?

Link to comment
Share on other sites

  • 0

No problem, thanks for your help to date anyway Michael.

 

I know for a fact that Apache and IIS support virtual directories, I imagine other web servers would too. Questions for Blesta support are;

 

  1. Are Blesta tags compatible with using virtual directories (any web server)?
    1. If so, what needs to be done to support this (i.e modification of routes.php, modification of .htaccess, etc)?
    2. If not, can this please be added as a feature request?
  2. Assuming Blesta is not currently compatible with virtual directories, what is the process for renaming the "Blesta" sub directory directory without invalidating my license?

Really appreciate your help, as I now have 2 clients waiting to pay via this method. Previously I had been billing manually via PayPal.

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
Answer this question...

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

Loading...
×
×
  • Create New...