[resolved] permalinks work on localhost, don't work in production (2 posts)

  1. jgmasot
    Posted 1 year ago #

    I have wordpress running fine in my local machine. When I migrate to production, using the plugin "duplicator", everything seems to work fine. In fact, I can access my dashboard successfully and navigate inside wordpress with no problems.

    However, when I try to "visit site" or navigate to the proper site directly I get the error "This webpage has a redirect loop".

    The error is solved by adding the following line to my functions.php file
    remove_filter('template_redirect', 'redirect_canonical');

    After adding this line, the site becomes available, however the permalinks do not work and any link would lead me to the home page instead. If I change the permalink settings to default
    (http://www.mydomain.com/?p=123) then everything works fine.

    Any help would be really very much appreciated.

  2. jgmasot
    Posted 1 year ago #

    Hi again
    Just in case this is helpful to someone:

    The problem was in my web hosting service. I raised the issue with them and they solved it for me.

    Then, I didn't require the remove_filter clause and every thing works fine. Also the permalinks.

Topic Closed

This topic has been closed to new replies.

About this Topic