Doesn’t work with local dev sites with paths
-
I installed this on my dev site but it kept giving 404s. I found out it’s happening because of the way I’ve set up my local dev.
I keep my sites under localhost. So, localhost:8888/<site> is the structure. When SFP tried to redirect to the prod site it added <site>/wp-content/wp-uploads/… which doesn’t exist on the prod site.
I changed the way it builds the url. See below
global $wp_query; $pagename = "/" . $wp_query->query['pagename']; $source = $settings['source_domain'] . $pagename;
This is after the substr check for trailing slash on line 111.
Once I changed this, the redirect work as intended. Feel free to review and add to the codebase.
- The topic ‘Doesn’t work with local dev sites with paths’ is closed to new replies.