Jump to content

Redirect for articles


Sonya*

Recommended Posts

We have over 800 articles made with Pages. After upgrade from 3.4.X to 4.4.X IPS has changed the canonical URL of the articles.

Old: http://example.com/database/category/article
New: http://example.com/database/category/article/

But there is no redirect, both URLs serve the same content. We experience SEO difficulties serving same content under different URLs. How do we create a 301 redirect for the old URLs?

Link to comment
Share on other sites

Add in your htaccess file this

//301 Redirect Old File
Redirect 301 http://example.com/database/category/article http://example.com/database/category/article/
 

or for nginx

# nginx configuration location Old { rewrite ^(.*)$ File redirect; } location http://example.com/database/category/article { rewrite ^(.*)$ http://example.com/database/category/article/ redirect; }

 

Link to comment
Share on other sites

1 minute ago, Adlago said:

Try this

We have over 800 articles in the database. And also old parameters like ?st=30 on the old links. We cannot do redirect on every single article with every single parameter as you suggest. There should be a common solution for all our articles URLs without parameters

Link to comment
Share on other sites

Archived

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...