user568021
user568021

Reputation: 1476

Codeigniter (or Drupal) adds one slash after base_url

I have an application located at www.example.com/mywebsite

It was all working ok, but for some reason codeigniter decided that it's gonna screw up all my links. In config.php I have this http://example.com/mywebsite as the base_url. I'm using the codeigniter anchor function (one would expect that this is the way to go).

What happens: If I look a link with the firebug it's href attribute looks ok. But when I click it, it takes me to this kind of url: http://www.example.com//mywebsite/whatever

It just adds one slash to much after my main domain. I hope anybody has any idea what is this?

EDIT: The website at www.example.com is on drupal. I don't know if drupal can be causing this but it's possible.

Upvotes: 0

Views: 78

Answers (1)

Diego Castro
Diego Castro

Reputation: 2156

Put a trailing slash at the end of http://example.com/mywebsite as it is said on the config.php file.

$config['base_url'] = 'http://example.com/mywebsite/';

Upvotes: 1

Related Questions