Just got to the end of a site build and the client is now saying the original site URL's need to stay the same and do not want to do 301 redirects due to loss of link juice.

The structure of the site has changed so not possible to match the URL structure. I have been trying to figure out how to rewrite the URL's so that they stay the same in the address bar but map to different content.

As an example

Old URL: advisories/sos-12-11

New WordPress rewritten URL: relateditem/sos-12-11

Have tried:

RewriteRule ^advisories/([A-Za-z0-9-]+)$ index.php?relateditem=$1 [L]

With Permalinks set to custom (/%postname%) this maps through to the right location but changes the address in the address bar.

With Permalinks set to default it just maps to the home page and does not change the address bar.

Seems the two are interacting but cannot figure out how. Any help greatly appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.