Home > Blockchain >  RexgEx from .asp to Wordpress Not working as expected
RexgEx from .asp to Wordpress Not working as expected

Time:10-11

I have a very old site (Microsoft .asp) that I am rebuilding in WordPress. I am preserving the identical url structure on the new site.

Example: https://example.org/directory/mypage.asp TO https://example.org/directory/mypage/

I have written a RegEx for the pages that end in .asp as follows. (Using Redirection plugin)

Source URL

/(.*).asp

Target URL

/URL: /$1/

But it is not working as expected - the .asp link still resolves.

CodePudding user response:

For anyone else that may need this - here is the correct RegEx.

Source URL: ^/(.*).asp Target URL: /$1/

RegEx: Checked

  • Related