Jump to content

Archived

This topic is now archived and is closed to further replies.

allanlove

Issue with trailing slash on post/page pagination section

Recommended Posts

allanlove+    1
allanlove

Hi

 

i have used the post/page pagination section on a site i have built and i have an issue with it causing 301 redirects.

 

When the 'Next Entries' button points back to the blog homepage it puts a trailing slash at the end of the url and this is causing an unnecessary 301 redirect.

 

It does it in the categories on the blog as well as the post pages. See below for clarity of the issue.

view-source:http://fireandelectrical.co.uk/blog/page/2
line 119:
<link rel='prev' href='http://fireandelectrical.co.uk/blog/'; />

view-source:http://fireandelectrical.co.uk/category/fire-safety/page/2
line 120:
<link rel='prev' href='http://fireandelectrical.co.uk/category/fire-safety/'; />

Is there something i can do to change how the section works to stop it from doing this?

Thanks

Allan 

Share this post


Link to post
Share on other sites
Simon    247
Simon

do you have a / at the end of your permalinks setting?

Share this post


Link to post
Share on other sites
allanlove+    1
allanlove

No, I don't. I did think of adding it but wasn't sure if that would cause more issues due to the fact that all previous permalinks would not have the /

Share this post


Link to post
Share on other sites
allanlove+    1
allanlove

What if a back link points to a page such as fireandelectrical.co.uk/blog without the / at the end? Or if someone has bookmarked a page that doesn't have the / at the end?

Share this post


Link to post
Share on other sites
Simon    247
Simon

The links will still work

Share this post


Link to post
Share on other sites
allanlove+    1
allanlove

Ok, thanks, I'll do that then !!

Share this post


Link to post
Share on other sites

×