I’ve done some research on this and cannot find an good solution. I come from an ASP.net background and am moving our site to WordPress.
My old portfolio link format is as follows
/custom-website-design/airline-aviation/5
The same link on the new website will be
/custom-website-design/airline-aviation
Note the last “/5” is not there. On my old site I used this to look up the category on the back end.
Now my question is, in wordpress, using either a plugin or a custom .htaccess file, can I have the site look for
/custom-website-design/(ANYTHING)/(NUMERIC)
and then have it redirect to
/custom-website-design/(ANYTHING)
Thanks again!
It can be done using WordPress rewrite module but i’m not an expert.
Anyway, you can also do it using .htaccess and mod_rewrite.
You can put this code in your htaccess (which has to be in root folder)
Note: since you’re using WordPress, you have to put this rule before WordPress’ main rule.
Should look like this finally