[solved] pretty url double //

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
son123
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 20, 2012 5:52 pm

[solved] pretty url double //

Post 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]
Last edited by son123 on Tue Jun 05, 2012 3:43 pm, edited 2 times in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: pretty url double //

Post 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';
son123
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 20, 2012 5:52 pm

Re: pretty url double //

Post by son123 »

That was my first thought, but... no it has no trailing forward slash:
$config['root_'] = 'http://yawtest.sensorystore.co.uk';
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1975
Joined: Mon Jan 29, 2007 4:47 pm

Re: pretty url double //

Post 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!
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
son123
Forum Members
Forum Members
Posts: 16
Joined: Tue Mar 20, 2012 5:52 pm

SOLVED! Re: pretty url double //

Post 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']
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: pretty url double //

Post 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
Locked

Return to “[locked] Installation, Setup and Upgrade”