I use the following code to request the URI in order to display multi-language content variables. That works fine for every page that has an URI. My problem is the frontpage: For the pure domain www.domain.com without URI it doesn't work, however it works for www.domain.com/index.php. I can't figure out the right syntax for the frontpage, please help.
if (stripos($_SERVER['REQUEST_URI'],'index') !== false ) {
// Frontpage
$lang['META_TITLE'] = 'Welcome to the frontpage';
$lang['META_DESCRIPTION'] = '';
$lang['META_KEYORDS'] = '';
$lang['PAGE_TITLE'] = '';
$lang['BREADCRUMB'] = '';
}
Create a .htaccess file in main root and paste this code .... i hope its work for you
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.