When typing the URL to my website, it adds words to the end

I have a problem which I tried Googling for solutions but couldn’t find it. When I type a URL of my website’s page or visit it from a bookmark, it adds words at the end of the URL, leading to a 404 error.

So I have this URL:

Read More

https://www.mywebsite.com/whmcs/admin/

When I type the URL or visit it from a bookmark, it returns this:

https://www.mywebsite.com/whmcs/admin/whmcs/admin/

This is a WordPress website. What could be the problem? Thanks in advance.

# BEGIN WordPress 
<IfModule mod_rewrite.c>
    RewriteEngine On 
    RewriteBase / 
    RewriteRule ^index.php$ - [L] 
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule . /index.php [L] 

    RewriteCond %{HTTP_HOST} !^www. 
    RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI}$1 [R=301,L]

    RewriteCond %{HTTPS} off 
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}$1 
</IfModule> 
# END WordPress

Related posts

1 comment

  1. There should be a line-break between RewriteEngine and RewriteBase

    RewriteEngine On
    RewriteBase /
    

Comments are closed.