Jump to content
  • 0

Mod_Rewrite Issue


neosync

Question

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.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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

Link to comment
Share on other sites

  • 0

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. 

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