wrong redirect

Hi i am not sure whcih plugin to pick. But every wrong page leads to this page:
https://www.websitelight.nl/www.websitelight.nl
Which is an error result.
I activated access to the site.

this is my htaccess:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*\.php)$ $1 [L]
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . index.php [L]
# END WordPress
# BEGIN WP-HUMMINGBIRD-CACHING
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A0

<FilesMatch "\.(txt|xml|js)$">
ExpiresDefault A691200
</FilesMatch>

<FilesMatch "\.(css)$">
ExpiresDefault A691200
</FilesMatch>

<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
ExpiresDefault A691200
</FilesMatch>

<FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
ExpiresDefault A691200
</FilesMatch>
</IfModule>

<IfModule mod_headers.c>
<FilesMatch "\.(txt|xml|js)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>

<FilesMatch "\.(css)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>

<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|svg)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>

<FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
Header set Cache-Control "max-age=691200"
</FilesMatch>
</IfModule>
# END WP-HUMMINGBIRD-CACHING
## WP Defender - Prevent information disclosure ##
<FilesMatch "\.(txt|md|exe|sh|bak|inc|pot|po|mo|log|sql)$">
Order allow,deny
Deny from all
</FilesMatch>
<Files robots.txt>
Allow from all
</Files>
<Files ads.txt>
Allow from all
</Files>
## WP Defender - End ##
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Please let me know
Erik

  • Predrag Dubajic

    Hi Erik,

    We have a General section for questions that are not related to our products so I have moved your ticket there.

    I don't see anything wrong within the .htaccess but it's better to test this in order to be sure.
    Download your .htaccess file locally so you have a backup, then replace the entire code of the file with the default code, for your site that would be this:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    Check the 404 pages after that and see if it works after that.

    If that doesn't help I would suggest performing a conflict by disabling all of your plugins and switching to default WP themes to see if any of those are responsible for this redirect.
    Please make sure to have full backup ready before performing this test.

    Best regards,
    Predrag

  • erik

    Hi Predrag,

    I changed the htaccess. It changed nothing. Then i deactivated all plugins, one by one. No change.

    Then i noticed this in the debug log:

    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: host in /home/erikplom/public_html/wp-includes/canonical.php on line 504
    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: host in /home/erikplom/public_html/wp-includes/canonical.php on line 505
    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: host in /home/erikplom/public_html/wp-includes/canonical.php on line 505
    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: host in /home/erikplom/public_html/wp-includes/canonical.php on line 506
    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: host in /home/erikplom/public_html/wp-includes/canonical.php on line 509
    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: scheme in /home/erikplom/public_html/wp-includes/canonical.php on line 530
    [26-Mar-2019 14:19:03 UTC] PHP Notice: Undefined index: host in /home/erikplom/public_html/wp-includes/canonical.php on line 504

    Can this file be changed? It has to do with redirects.

    Please let me know
    Erik

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.