Forum Discussion

mbuk2k_59598's avatar
mbuk2k_59598
Icon for Nimbostratus rankNimbostratus
Aug 29, 2013

Extracting/Removing part of a URI

Hello,

 

Apologies if this has already been asked, however is it possible to extract part of a URI?

 

For example; an incoming URL may be:

 

http://originalurl.com/pages/index.htm/2013/08/15/mypost

 

and we want it to 301 redirect it TO:

 

http://newurl.com/2013/08/15/mypost

 

So we'd want to change the host (which is easy enough), however we want to drop the /pages/index.htm part of the original URI while maintaining anything after that; which in this example is /2013/08/15/mypost

 

Does anyone know if this is even possible?

 

Any guidance would be kindly appreciated.

 

Thank you

 

13 Replies