Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

Change of Permalink and redirect

         

Gemini23

9:11 pm on Nov 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can anyone advise

Currently have permalink of

/index.php/%post_id%/%postname%/

and wanting to change to the following

/index.php/%category%/%post_id%/%postname%/

Change the permalink and the change works fine but it doesn't redirect the old to a new - is there anyway to do that? Rather than leaving a lot of 404s from backlinks - I have looked at a couple of plugins but they don't seem to work. Hosting company have said a plugin would be better than htaccess.

Help anyone?

travelin cat

9:17 pm on Nov 11, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Do you have Yoast SEO installed? If so, you can redirect pages with it.

Gemini23

9:21 pm on Nov 11, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes I do.... but can you do a 'global redirect' for several hundred posts?

travelin cat

9:30 pm on Nov 11, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



No. just on a page by page basis.

Planet13

2:35 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A redirect that is based on only being delivered when the 404 page is served is going to be quicker than an htaccess redirect, since the htacess file is read on every page load, and if you have 200 redirects in it, the whole site will load slower.

If the list of redirects is ONLY served when someone requests a 404 page, then the only time the site would be slowed down is when the request is for a page that has been 404'd.

lorax

4:34 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You could use the Redirection plugin. It accepts Regex as well as static URLs.

Gemini23

5:02 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks lorax - with the "Redirection" plugin all I get on the settings screen is a blank white screen... so not quite sure what to do with it...

lorax

6:39 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You're using this one? [wordpress.org...]

That suggests to me you have another plugin or custom code that's not playing nice. I have the plugin installed on several sites and have not had an issue with it. Did you check the support forum for it?

Gemini23

6:42 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes that's the one... I install the plugin - click on settigs and just get a plain white screen so cannot do anything... I have asked about it but no reply yet...

lorax

6:51 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do you have a caching plugin installed? If so, try a) clearing the cache and if no joy, b) deactivate it and try again.

Are you using the latest version of WordPress?

lorax

6:58 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Just noticed an existing thread in the WP Support forum for the Redirection plugin that mentions the white screen when you click on settings. A suggested work around was to download the previous version of the plugin and try it.

Gemini23

7:05 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I must have missed that suggestion... it seems odd really that there aren't a number of plugins for it.. having searched through numerous articles there certainly seems to be a demand for it.

Gemini23

9:01 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Okay.. uploaded previous version of redirection...
is it possible to just add the permalink structures in there or do you have to enter each url?
ie source url and target url

lorax

9:28 pm on Nov 12, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Use Regex. It allows you to look for patterns in the URL and send matches (hopefully more than one page) to a single page. If each in-bound URL has a unique matching URL then you'll need to build a redirect for each one.