2

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.

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.