Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Redirecting old permalink structure to the new one

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #32973
    Metin
    Member

    Hey!

    I had a wordpress site installed in a sub folder with category/post-title permalink structure, which resulted in the following url structure

    http://www.mysite.com/subfolder/category/post-title

    However as I needed to move my site to the root folder on another server and changed the permalink structure to year/month/post-title, which looks like below, users who visit my website through the links published on other websites see 404 error page as expected.

    http://www.mysite.com/year/month/post-title

    While doing the changes, moving wordpress to the root directory on another server and changing permalink structure, I forgot to take into account that such problem could occur. Anyway, I made a mistake and now I’m trying to fix the problem.

    I wonder is there a way to redirect the old urls to the new ones? Editing .htaccess or using a plugin or something else. The method doesn’t matter at this stage. All I want is to solve the problem

    Any help? Thanks in advance.

    #74412
    OniLinkCR
    Member

    Editing the htaccess is the way to go. A 301 redirect on the affected pages. You can also do it on a PHP basis (assuming it is build on PHP)

    #74246
    Metin
    Member

    I’ve been working on .htaccess file writing various combinations of Rewrite rules. But, as I’m a total newbie when it comes to .htaccess, I’ve got nowhere.
    I need some code examples to figure out how I write my own code.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.