// Check if mod_rewrite is enabled
$mod_rewrite = FALSE;
if (function_exists('apache_get_modules') && in_array('mod_rewrite', apache_get_modules())) {
$mod_rewrite = TRUE;
} elseif (getenv('HTTP_MOD_REWRITE') == 'On') {
$mod_rewrite = TRUE;
} elseif (isset($_SERVER['IIS_UrlRewriteModule'])) {
$mod_rewrite = TRUE;
} elseif (isset($_SERVER['HTTP_MOD_REWRITE'])) {
$mod_rewrite = TRUE;
}
define('MOD_REWRITE', $mod_rewrite);
if (!MOD_REWRITE) {
addNotice('danger', "<i class='fa fa-lg fa-warning m-r-10'></i>".$locale['rewrite_disabled']);
}
// Rewrite settings
$htc .= "Options +SymLinksIfOwnerMatch".PHP_EOL;
$htc .= "<IfModule mod_rewrite.c>".PHP_EOL;
$htc .= " # Let PHP know mod_rewrite is enabled".PHP_EOL;
$htc .= " <IfModule mod_env.c>".PHP_EOL;
$htc .= " SetEnv MOD_REWRITE On".PHP_EOL;
Quote
On the same server I have installed PHP Fusion version 9.00.00 and there permalinks work well.
The code which you pasted does not show any notice with rewrite_disabled, so I think that the option of rewriting enabled: D
Where can I find these settings in the database? which table is response of Permalinks?
- by kosiorskieu
# Force utf-8 charset
AddDefaultCharset utf-8
# Security
ServerSignature Off
# Secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
# Protect config.php
<Files config.php>
order allow,deny
deny from all
</Files>
# Block Nasty Bots
<IfModule mod_setenvifno.c>
SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT
</IfModule>
# Disable directory listing
Options -Indexes
Options +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
# Let PHP know mod_rewrite is enabled
<IfModule mod_env.c>
SetEnv MOD_REWRITE On
</IfModule>
RewriteEngine On
RewriteBase /
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(administration|themes)/*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !^/(administration|config|index.php)
RewriteRule ^(.*?)$ index.php [L]
</IfModule>
ErrorDocument 400 /error.php?code=400
ErrorDocument 401 /error.php?code=401
ErrorDocument 403 /error.php?code=403
ErrorDocument 404 /error.php?code=404
ErrorDocument 500 /error.php?code=500
PDOMySQL.inc
/www/portal/administration/permalink.php?aid=7ecdedc8e3fd7b8f&disable=homepage
Line: 71
Category Forum
SEO & SEF - 9Labels
None yet
Statistics
4 participants
Notifications
You are not receiving notifications from this thread.
Related Questions