Comment reply href is different on production vs local

Question

So I can reply to comments on local but it doesn’t work on live. I can reply via the admin panel but when I click reply on a comment on a single page, it doesn’t work.

I checked the code and it seems like the href of the reply button is rendered differently.

This is how it looks on localhost

<a rel="nofollow" class="comment-reply-link" href="http://localhost:8888/foobar/?replytocom=1285#respond" data-commentid="1285" data-postid="7086" data-belowelement="comment-1285" data-respondelement="respond" data-replyto="Reply to foobar" aria-label="Reply to arsd">Reply</a>

This is how it looks on production

<a rel="nofollow" class="comment-reply-link" href="#comment-1285" data-commentid="1285" data-postid="7086" data-belowelement="comment-1285" data-respondelement="respond" data-replyto="Reply to Alex Kwa" aria-label="Reply to foobar">Reply</a>

I’m thinking it could be either a plugin, permalink or htaccess issue.

  • I don’t have any plugins that touches the comments.
  • My permalink is custom but where possible I would like not to change it due to SEO impact.
  • My htaccess looks like this
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE] 

<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

SetEnv MAGICK_THREAD_LIMIT 1
 

Any help will be much appreiciated.

0
, , alexkwa 3 months 0 Answers 48 views 0

Leave an answer