global URI object missing slash after base url

General questions relating to Joomla! 1.5 There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Locked
User avatar
lumoo
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Fri Nov 09, 2007 10:24 pm
Location: Germany
Contact:

global URI object missing slash after base url

Post by lumoo » Sat Oct 30, 2010 11:42 am

Hi everyone,

Searched the forums but can't find an answer.

Standard install of latest J1.5

Calling the $u =& JURI::getInstance(); or the $u =& JFactory::getURI(); and then $u->toString()
gives http://www.mysite.com?index.php&blahblah

i.e. the forward slash is missing after the base url in all circumstances.

The base url in config I have tried with and without a trailing slash, turned off SEF, disabled .htaccess etc etc.
All the normal things.

The object is

Code: Select all

JURI Object
(
    [_uri] => http://www.mysite.com/contact-me
    [_scheme] => http
    [_host] => www.mysite.com
    [_port] => 
    [_user] => 
    [_pass] => 
    [_path] => contact-me
(note missing forward slash)

etc....

On any other J! site I try I get this

Code: Select all

JURI Object
(
    [_uri] => http://www.cofform.be/contact
    [_scheme] => http
    [_host] => www.cofform.be
    [_port] => 
    [_user] => 
    [_pass] => 
    [_path] => /contact
etc..

Any help appreciated..

Cheers

Loz007
Joomla! Apprentice
Joomla! Apprentice
Posts: 16
Joined: Thu Feb 24, 2011 5:51 pm
Location: Vegas
Contact:

Re: global URI object missing slash after base url

Post by Loz007 » Sat Feb 26, 2011 2:36 am

I get this problem too, been looking for a solution for over 10 hours and cant find anything... all my links with no suffix selected in the global area, when loaded come out like...

domain.com/somepost

when it should be

domain.com/somepost/

does anyone know how to resolve this issue please?

this is my htaccess file

Code: Select all

##
# @version $Id: htaccess.txt 14401 2010-01-26 14:10:00Z louis $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section
Thanks in advance for any help you can provide...

Loz
Only literal URLs allowed. Please, see forum rules for details. Thanks.

rajmohansoft
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Wed Apr 29, 2015 3:31 pm

Re: global URI object missing slash after base url

Post by rajmohansoft » Thu Jul 23, 2015 7:06 pm

Hi,

I'm also facing the same error on my site.please tell me for solution for this.

User avatar
mbrando
Joomla! Explorer
Joomla! Explorer
Posts: 363
Joined: Fri Dec 02, 2005 1:32 pm
Contact:

Re: global URI object missing slash after base url

Post by mbrando » Thu Jul 23, 2015 10:22 pm

Hello,

anyone have a solution. I'm facing this same issue.

- Mike
JIKOmetrix - Reliable web hosting
 http://www.jikometrix.net


Locked

Return to “General Questions/New to Joomla! 1.5”