Argiropoulos Stavros
Argiropoulos Stavros

Reputation: 9533

Codeigniter + Wordpress site_url issue

Hello For some reason echoing site_url gives me http://mydomain/blog instead of http://mydomain. In config.php i have
$config['base_url']= "http://mydomain/"; and
$config['index_page'] = "";

I have a blog folder in my root directory that contains the wordpress. Where blog segment comes from and how can i remove it? I have a problem because it appears in every redirect.

Upvotes: 2

Views: 872

Answers (1)

David Houde
David Houde

Reputation: 4778

I think this is defined in wp-app.php and is the base url + the folder of the WP installation.

I assume you are talking about wordpress redirects, and you would like to redirect to your main site instead of the wordpress installation?

You might want to use home_url() instead...

The site_url template tag retrieves the site url for the current site (where the WordPress core files) with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If scheme is 'http' or 'https', is_ssl() is overridden.

The home_url template tag retrieves the home url for the current site with the appropriate protocol, 'https' if is_ssl() and 'http' otherwise. If scheme is 'http' or 'https', is_ssl() is overridden.

Upvotes: 2

Related Questions