I feel as though I’m going insane. For the life of me, I cannot track down the cause of why this is happening.
A website I host [https://semdeck.com]) (for reasons I cannot figure out) is showing two forward slashes at the end of it so it appears as [semdeck.com//])
I’ve set it up the same as every other website I’ve ever built. Here is part of the .htaccess file:
>*# Always use https for secure connections*
>
>*# Replace ‘www.example.com’ with your domain name*
>
>*# (as it appears on your SSL certificate)*
>
>*RewriteEngine On*
>
>*RewriteCond %{SERVER\_PORT} 80*
>
>*RewriteRule \^(.\*)$ \[R=301,L\]*
>
>*<IfModule mod\_rewrite.c>*
>
>*RewriteBase /*
>
>*# rule 1: remove multiple leading slashes (directly after the TLD)*
>
>*RewriteCond %{THE\_REQUEST} \\s/{2,}*
>
>*RewriteRule (.\*) $1 \[R=301,L\]*
>
>*# rule 2: remove multiple slashes in the requested path*
>
>*RewriteCond %{REQUEST\_URI} \^(.\*)/{2,}(.\*)$*
>
>*RewriteRule (.\*) %1/%2 \[R=301,L\]*
>
>*</IfModule>*
And the functions.php file contains the following:
>*/\*\**
>
>*\* Define Constants*
>
>*\*/*
>
>*define( ‘ASTRA\_THEME\_VERSION’, ‘3.9.2’ );*
>
>*define( ‘ASTRA\_THEME\_SETTINGS’, ‘astra-settings’ );*
>
>*define( ‘ASTRA\_THEME\_DIR’, trailingslashit( get\_template\_directory() ) );*
>
>*define( ‘ASTRA\_THEME\_URI’, trailingslashit( esc\_url( get\_template\_directory\_uri() ) ) );*
I thought that both of those are signaling that there should only be one “/” at the end of the domain but I guess not. Either way, I am completely out of guesses as to why this is happening. Perhaps a plugin conflict? I’ve gone into Yoast SEO and even modded the canonical URL for the homepage to no avail.
Anyone have any idea what’s going on here?
[ad_2]
Check your permalink settings
Don’t know exactly what is causing it, although I feel like a lot of that extra stuff you added to your .htaccess could be at fault. Have you tried simply deleting all of your custom stuff in the .htaccess and your constants in functions and just using the default .htaccess to see if that fixes the issue? At least that way you’ll know if it’s your custom lines that are messed up.
Default WordPress .htaccess is as simple as:
`<IfModule mod_rewrite.c>`
`RewriteEngine On`
`RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]`
`RewriteBase /`
`RewriteRule ^index.php$ – [L]`
`RewriteCond %{REQUEST_FILENAME} !-f`
`RewriteCond %{REQUEST_FILENAME} !-d`
`RewriteRule . /index.php [L]`
`</IfModule>`
It’s to do with the rules in your .htaccess file:
Can you look at the db? In the wp_options table do the entries for `home` and/or `siteurl` contain a slash at the end?