Page 1 of 1

[solved] pretty url double //

Posted: Fri Jun 01, 2012 12:24 pm
by son123
Hi,
I'm trying to set up pretty url's CMSMS VERSION: 1.10.3.
The issue i'm having is that I am getting two backslashes instead of one following my domain name.
e.g "http://mysite.co.uk//services/project.html

Any idea why the extra forward slash would be coming from?

$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';

And my .htaccess file

Options +FollowSymLinks

RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L,NE]

# 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,NE]

Re: pretty url double //

Posted: Fri Jun 01, 2012 6:50 pm
by Dr.CSS
Sounds like your root url has a / on the end of it...

$config['root_url'] = 'http://somesite.com/';

Should be...

$config['root_url'] = 'http://somesite.com';

Re: pretty url double //

Posted: Sat Jun 02, 2012 11:17 am
by son123
That was my first thought, but... no it has no trailing forward slash:
$config['root_'] = 'http://yawtest.sensorystore.co.uk';

Re: pretty url double //

Posted: Sat Jun 02, 2012 6:14 pm
by Jo Morg
Actually, I don't think you need:

Code: Select all

RewriteBase /
Try to comment out that line:

Code: Select all

#RewriteBase /
HTH!

SOLVED! Re: pretty url double //

Posted: Mon Jun 04, 2012 4:35 pm
by son123
Thanks for your help. the issue wasn't a mis-configured config parameter but a mis-pelt one. not sure how that happened but all working fine now.

$config['root_'] instead of $config['root_url']

Re: pretty url double //

Posted: Mon Jun 04, 2012 7:06 pm
by Dr.CSS
That's why we link all the system info we can get...

http://forum.cmsmadesimple.org/viewtopic.php?f=3&t=8692