By John Rankin on Monday, 09 October 2017
Posted in General
Likes 0
Views 672
Votes 0
Hi Guys,

We are having an issue with setting up redirects for old blog posts that no longer exist. The issue is raised because Google still returns blog pages in it's indexing even when the blog has been replaced.

We are using the built in "redirect" manager to set up the redirects (there are far to many to use HTAccess, plus the client does not have access to HTAccess in rder to edit it), and we are getting the following error message:

400 - Sorry but we couldn't find the blog entry that you are looking for

When checking, the redirect manager can only deal with 404 errors, and not 400 errors, and a search via Google mentions that you have a function to generate redirects for old blog posysts that no longer exist. Therefoere my question is, 1. do you have a redirection plugin that can redirect old blog posts to new blog posts?, and 2. does it work with the redirect manager, or is it only accessible from within Easy Blog?

To see an example of what I mean here, try visiting the following page:

http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-1

This should redirect you to the following page, but instead throws the 400 errormentioned above:

http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-3

However, if you directly type in the 2nd URL you can directly access the page, so the issue is clearly that the redirection is not working.

The problem is mainly because the clients customers bookmark the product info pages in the blogs, and thus the client needs the redirection to be in place so that they are redirected to the new, replacement page.

Any help or suggestions that you can give on this would be much appreciayted.
Ah I see. Got it, I will add this as a 404 instead of 400 internally.
·
Tuesday, 10 October 2017 01:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey John,

Sorry but I am a little confused here. Here's what I tried,

1. When I tried to access http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-1 , I am getting a 400 error page and there isn't any redirection going on there as you can see here, http://take.ms/udfHV

2. When I tried to access http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-3 , I am able to view the blog post, which leads me to believe this is the correct URL to the blog post?
·
Monday, 09 October 2017 23:01
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

You have hit the nail on the head, what you tried is exactly what I was trying to describe the problem is.

Since I asked the question I have arrived at the conclusion that the error is occuring long before any redirection can take place, so essentiall the issue is because the blog post no longer exists, instead of a redirection being completed, an error is being throwb because EasyBlog cannot find the post.

I will read through the links you supplied, but in the meantime, any ideas?
·
Monday, 09 October 2017 23:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey John,

Hm, which should be the correct URL?

Should it be http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-3

or

Should it be http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-1

By the way, perhaps you could try changing it to render a 404 instead of a 400. Could you edit the file /components/com_easyblog/views/entry/view.html.php and at line 57 locate the codes below,

[gist]
return JError::raiseError(400, $exception->getMessage());
[/gist]

Replace it with,

[gist]
return JError::raiseError(404, $exception->getMessage());
[/gist]
·
Monday, 09 October 2017 23:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Thanks for that. The URL http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-1 is the old URL that needs to be redirected to the new URL http://www.scientificss.co.uk/blog/alytech-launch-new-two-channel-gasmix-zephyr-1-3

I have made the suggested change to the view.html.php file as suggested, and the redirection now works as expected, so thatnk you for that.

However, this can only really be a short term fix, as everytime that EB is updated, the change will be overwritten, so this fix is fine for now, but what will happen when you release the next update to EB, as I will then lose my "fix" (it is not practical for me to manually update this each time an update is rteleased as I support in excess of 100 websites, and I cannot remember every single little fix like this each time, so I need to be sure of a longer term fix.
·
Tuesday, 10 October 2017 00:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey John,

Hm, it shouldn't be updating the URL at all. Do you mean when you upgrade EasyBlog, the URL get's changed?
·
Tuesday, 10 October 2017 00:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

No, perhaps I am not explaing very well.

What I mean is that I have just made a change to the "/components/com_easyblog/views/entry/view.html.php" file to fix the issue.

However, the next time EasyBlog is updated surely the "/components/com_easyblog/views/entry/view.html.php" will aos be updated, and then my "fix" will be overwritten!

My question was essentially do you have a fix that does not risk being overwritten when the core EB is updated?
·
Tuesday, 10 October 2017 00:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark, Thank you.
·
Tuesday, 10 October 2017 08:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

You are most welcome. Glad to hear that your issue has been resolved now.

As a gentle reminder, kindly start a new thread if you have any other issue in the future so it will be easier for us to manage your inquiry. I will lock and mark this thread as resolved.
·
Tuesday, 10 October 2017 10:12
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post