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:
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
There should be a line-break between
RewriteEngine
andRewriteBase