• 0

Issue with trailing slash on post/page pagination section


Question

Posted · Report post

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

6 answers to this question

  • 0

Posted · Report post

The links will still work

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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

Share this post


Link to post
Share on other sites
  • 0

Posted (edited) · Report post

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 /

Edited by allanlove

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

you should add one.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

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
  • 0

Posted · Report post

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now