Link to home
Create AccountLog in
Avatar of Member_2_7966984

asked on

Regular Expression needed to Alter URL on WPengine hosted website using Nginx

So we recently migrated a site over from Joomla to wordpress - we were able to get the permalinks to match very closely however the joomla URL throws a random number in fron of the post title in the URL - They are very concerned about getting the links to redirect properly on the new website - So was wondering if someone could help me with writing a redirect rule that would work on a Nginx server 

I found this post which seems similar to what I am trying to do - 

just need it modified for my specific use case 

So here is an example scnario

 New site URL (Wpengine)  - 

current site URL (Joomla)

So I would need a 301 redirect rule that would remove the random numbers in front of the post name - in this example it would be 24279-  that would need to be removed to create a redirect that goes to 

we were playing around with some stuff but it was breaking a lot of the image URLs because some of the images have numbers in them... So need a solution that will not change the URL if it is an image.

This is what we tried 
User generated image

Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account