[Solved] Live Site adding extra "/" to URL -Weirdness for sure?
Posted: Fri Dec 19, 2008 4:28 pm
I've just went live with the website, everything on the "dev" server was perfect with no issues at all.
However, now that I've gone live...I am seeing a forward slash appended to the URL.
http://www.naturalglo.com//Exclusive-Technology/
It all works and I've never seen this happen before...so I really don't want to leave it like this.
Can someone help me find where this is coming from please?
Thanks!
Detail information:
Here is my config.php (I've removed all comments to keep it short):
And here is my .htaccess file (I'm using mod-rewrite):
However, now that I've gone live...I am seeing a forward slash appended to the URL.
http://www.naturalglo.com//Exclusive-Technology/
It all works and I've never seen this happen before...so I really don't want to leave it like this.
Can someone help me find where this is coming from please?
Thanks!
Detail information:
Here is my config.php (I've removed all comments to keep it short):
Code: Select all
<?php
#-----------------
#Behaviour Settings
#-----------------
$config['php_memory_limit'] = '';
$config['process_whole_template'] = true;
$config['debug'] = false;
$config['output_compression'] = false;
#-----------------
#Database Settings
#-----------------
$config['dbms'] = 'mysql';
$config['db_hostname'] = 'db_hostname';
$config['db_username'] = 'db_username';
$config['db_password'] = 'db_password';
$config['db_name'] = 'db_name';
#Change this param only if you know what you are doing
$config["db_port"] = '';
$config['db_prefix'] = 'ng_';
$config['persistent_db_conn'] = false;
$config['use_adodb_lite'] = true;
#-------------
#Path Settings
#-------------
$config['root_url'] = 'http://www.naturalglo.com';
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
$config['root_url'] = str_replace('http','https',$config['root_url']);
}
$config['root_path'] = $_SERVER["DOCUMENT_ROOT"];
$config['admin_dir'] = 'admin';
$config['previews_path'] = '/tmp/cache';
$config['uploads_path'] = '/uploads';
$config['uploads_url'] = $config['root_url'] . '/uploads';
#---------------
#Upload Settings
#---------------
$config['max_upload_size'] = 50000000;
$config['default_upload_permission'] = '664';
#------------------
#Usability Settings
#------------------
$config['use_smarty_php_tags'] = false;
$config['auto_alias_content'] = true;
#------------
#URL Settings
#------------
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
#--------------
#Image Settings
#--------------
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';
$config['image_uploads_path'] = '/uploads/images';
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images';
#------------------------
#Locale/Encoding Settings
#------------------------
$config['locale'] = '';
$config['default_encoding'] = 'utf-8';
$config['admin_encoding'] = 'utf-8';
#---------------------------------------------
$config['old_stylesheet'] = false;
$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel';
$config['backwards_compatible'] = false;
$config['disable_htmlarea_translation'] = false;
$config['use_Indite'] = true;
?>
Code: Select all
Options +FollowSymLinks -Indexes
RewriteEngine on
# RewriteBase /
# 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=$1 [QSA]
# No sense advertising what we are running
ServerSignature Off
# URL Filtering helps stop some hack attempts
#IF the URI contains a "http:"
RewriteCond %{QUERY_STRING} http\: [OR]
#OR if the URI contains a "["
RewriteCond %{QUERY_STRING} \[ [OR]
#OR if the URI contains a "]"
RewriteCond %{QUERY_STRING} \] [OR]
#OR if the URI contains a "<__script__>"
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#OR script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
#OR any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^.*$ - [F,L]
# END Filtering