Skip to content

Commit

Permalink
improve more_rewrite related error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kerphi committed Feb 28, 2013
1 parent f4713c4 commit e53c9a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions client/jquery.phpfreechat.init.js
Expand Up @@ -72,17 +72,18 @@ var phpFreeChat = (function (pfc, $, window, undefined) {
* Test the rewrite rules are enabled on the server
*/
pfc.checkServerConfigRewrite = function (next) {
var err_rewrite_msg = 'mod_rewrite must be enabled server side and correctly configured. "RewriteBase" could be adjusted in server/.htaccess file.';
$.ajax({
type: 'GET',
url: pfc.options.serverUrl + '/status'
}).done(function (status) {
if (!status || !status.running) {
pfc.showErrorsPopup([ 'mod_rewrite must be enabled server side' ]);
pfc.showErrorsPopup([ err_rewrite_msg ]);
} else {
next();
}
}).error(function () {
pfc.showErrorsPopup([ 'mod_rewrite must be enabled server side' ]);
pfc.showErrorsPopup([ err_rewrite_msg ]);
});
};

Expand Down
2 changes: 1 addition & 1 deletion server/.htaccess
@@ -1,6 +1,6 @@
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /path/to/app
#RewriteBase /path/to/phpfreechat/server
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
Expand Down

0 comments on commit e53c9a6

Please sign in to comment.