Jump to content

Question

Posted

We're considering migrating from WHMCS to Blesta and have the trial installed to see how it is. For some reason, a .htaccess file was not included within the installation, and when enabling mod_rewrite via .htaccess it seems like the URL system breaks and I need to put the index.php before the path. I'm wondering what the default .htaccess content should be. Could you guys let us know what we should put in the .htaccess file in order for Blesta to work? I'm not quite sure on what Blesta requires you to place.

2 answers to this question

Recommended Posts

  • 0
Posted

I've confirmed that it's in Blesta 3.4.2 from https://account.blesta.com/client/plugin/download_manager/client_main/download/61/blesta-3.4.2.zip
 
/blesta/.htaccess
 
Here's the content:

########################################################
# package:    minPHP
# filename:   .htaccess
########################################################

<Files ~ "\.(pdt)$">
   order deny,allow
   deny from all
</Files>

# Protect against Clickjacking
#Header append X-Frame-Options "SAMEORIGIN"

RewriteEngine on

# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php

RewriteCond %{REQUEST_URI} ^(.*)/install.php$
RewriteRule install.php %1/install/ [R=301,L]

You can uncomment #Header append X-Frame-Options "SAMEORIGIN" to protect against click jacking, and  the 2 lines under # Force HTTPS to force an https:// connection

  • 0
Posted

I've confirmed that it's in Blesta 3.4.2 from https://account.blesta.com/client/plugin/download_manager/client_main/download/61/blesta-3.4.2.zip

 

/blesta/.htaccess

 

Here's the content:

########################################################
# package:    minPHP
# filename:   .htaccess
########################################################

<Files ~ "\.(pdt)$">
   order deny,allow
   deny from all
</Files>

# Protect against Clickjacking
#Header append X-Frame-Options "SAMEORIGIN"

RewriteEngine on

# Force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=307,NE,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php

RewriteCond %{REQUEST_URI} ^(.*)/install.php$
RewriteRule install.php %1/install/ [R=301,L]

You can uncomment #Header append X-Frame-Options "SAMEORIGIN" to protect against click jacking, and  the 2 lines under # Force HTTPS to force an https:// connection

 

Thanks, Paul! It works now. I downloaded the package from the Blesta homepage as I am not a client quite yet and am just trying it out. So far, it's great. 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...