• hello,
    for our site https://www.roboticmagazine.com
    if you type only
    roboticmagazine.com

    you get an error message that says :

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/21/6601321/html/roboticmagazine.com/index.php:11) in /home/content/21/6601321/html/roboticmagazine.com/wp-includes/pluggable.php on line 1179

    how to fix this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello ketanco,

    You will need to add redirect rule in .htaccess file.Add the following lines of code in your .htaccess file.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^roboticmagazine.com [NC]
    RewriteRule ^(.*)$ https://www.roboticmagazine.com/$1 [L,R=301,NC]

    This will redirect you non-www url to www url.

    It seems like your site is trying to redirect to the www version, however there was already something outputted before.

    Either you need to find what is being outputted before the redirect (e.g. disable all plugins, and see if it works)

    Or you need to hook in even earlier and handle the redirect before the header is sent.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘error message when not typing www’ is closed to new replies.