From e53c9a693473fe99dd26274975343d7f862f8d2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Gully?= Date: Thu, 28 Feb 2013 17:25:30 +0100 Subject: [PATCH] improve more_rewrite related error message --- client/jquery.phpfreechat.init.js | 5 +++-- server/.htaccess | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/jquery.phpfreechat.init.js b/client/jquery.phpfreechat.init.js index 2816ac44..bc3bddf0 100644 --- a/client/jquery.phpfreechat.init.js +++ b/client/jquery.phpfreechat.init.js @@ -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 ]); }); }; diff --git a/server/.htaccess b/server/.htaccess index b6bd4e61..5a1d657b 100644 --- a/server/.htaccess +++ b/server/.htaccess @@ -1,6 +1,6 @@ RewriteEngine On - #RewriteBase /path/to/app + #RewriteBase /path/to/phpfreechat/server RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,L]