diff --git a/.htaccess b/.htaccess index 9ebf33bfe..f69bfc77b 100755 --- a/.htaccess +++ b/.htaccess @@ -1,14 +1,25 @@ RewriteEngine On -# Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines. +# To redirect a subdomain to a subdir because of https not supporting wildcards +# replace values between <> with your ones +# RewriteCond %{HTTP_HOST} ^\.\.com$ [OR] +# RewriteCond %{HTTP_HOST} ^www\.\.\.com$ +# RewriteRule ^/?$ "https\:\/\/www\.\.com\/" [R=301,L] + +# To rewrite "domain.com -> www.domain.com" uncomment the following lines. # RewriteCond %{HTTPS} !=on # RewriteCond %{HTTP_HOST} !^www\..+$ [NC] # RewriteCond %{HTTP_HOST} (.+)$ [NC] # RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L] +# Suppress index.php from OSPOS URL +# Remember to set in application/config/config.php $config['index_page'] = ''; RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d +# if in web root RewriteRule ^(.*)$ index.php?/$1 [L] +# if in subdir comment above line, uncomment below one and replace with your path +# RewriteRule ^(.*)$ //index.php?/$1 [L] # disable directory browsing # For security reasons, Option all cannot be overridden. @@ -20,22 +31,22 @@ IndexIgnore * # secure htaccess file - order allow,deny - deny from all + order allow,deny + deny from all # prevent access to PHP error log - order allow,deny - deny from all - satisfy All + order allow,deny + deny from all + satisfy All # prevent access to generate_languages.php - order deny,allow - deny from all - allow from 127.0.0.1 + order deny,allow + deny from all + allow from 127.0.0.1 # My IP(s) # allow from xxx.xxx.xxx.xxx @@ -43,8 +54,8 @@ IndexIgnore * - - ExpiresActive On - ExpiresDefault "access plus 1 week" - + + ExpiresActive On + ExpiresDefault "access plus 1 week" + diff --git a/application/config/config.php b/application/config/config.php index c82190a6c..2ca905486 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -384,7 +384,7 @@ $config['sess_driver'] = 'database'; $config['sess_cookie_name'] = 'ospos_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = 'sessions'; -$config['sess_match_ip'] = FALSE; +$config['sess_match_ip'] = TRUE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE;