Your say you are modifying the rowid
which I assume are the numbers you are bolding in your 1,2 statements, and at the same time you want to redirect to a different slug and rowid
which is the dashed statement before the rowid
at the end of the url e.g. some-page-name
.
I'm not sure what the rowid
has to do with anything, perhaps it's just a random int to make sure you don't have duplicate slugs, but it isn't strictly required as long as you increment your titles if you have duplicates like some-page-name
and some-page-name-1
.
In PHP and codeigniter what you are trying to do is indeed possible as long as you keep a database with all the iterations of the slug
. Then in your Market-Reports
controller you just look for the most recent iteration of the slug
and serve that as a link to the user. Or if the user is coming from a search engine, on the say Market-Reports
single page controller to timing-relay-market-241993160
you query the database where rowid = 'someid'
and order by created
or something and then redirect the user to that slug which would be medical-device-testing-market-254474064.
Further if your database table for keeping track of slugs has the following rows rowid
, rowtitle
, fullslug
you could literally just use intval()
to get the rowid
from the fullslug and do the same type of thing as I just outlined in the previous paragraph.
NOTE: You cannot do this with static HTML pages. I am assuming since you tagged PHP and codeigniter you are using php and controllers.