I am trying to get pretty URLs to work, and I have gotten it to work, but dont know how to get rid of the index.php in my URL string.
This is code for my config_lang.php:
Code: Select all
define('DEFAULT_LANG', 'eng');
$hls = array(
'eng' => array(
'block'=>'en',
'flag'=>'<img src="/mysite/images/lang/us.png" style="border:0; opacity:1;" alt="English" />',
'text'=>'English',
'locale_cms'=>'en_US',
),
'fra' => array(
'block'=>'fr',
'flag'=>'<img src="/mysite/images/lang/fr.png" style="border:0; opacity:1;" alt="Français" />',
'text'=>'Français',
'locale'=>'fr_FR.utf8@euro',
'locale_cms'=>'fr_FR',
),
);
?>
Code: Select all
$config['assume_mod_rewrite'] = false;
$config['page_extension'] = '.html';
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = true;
Code: Select all
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /mysite
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/(.*)$ index.php?page=$2&hl=$1 [QSA]
</IfModule>
Code: Select all
http://www.mysite.com/index.php/eng/teachers-organizers.html
and
http://www.mysite.com/index.php/fra/teachers-organizers.html
Thanks,
Joe Cannes