I have changed my site url structure. But, Google indexed urls are giving 404 not found error. Now, I need a .htaccess rewrite rule for,
From url: www.mydomain.com/topic-titles-here-t273.html
To url: www.mydomain.com/sub-folder/topic273.html
(Topic id must be cached and topic title must be removed.)
Some times, like this also,
From url: www.mydomain.com/topic-titles-here-t273-15.html
To url: www.mydomain.com/sub-folder/topic273-15.html
I searched a lot, for about three hours, But couldn't find correct answer. Please help.
I am a little unclear on what you are trying to do but
1
Would take the second group (just 273.html) and append accordingly, the first group would be everything before (topic-titles-here-t)
is that what you require? If so the regex could be tidied I just wanted to demonstrate the two groups
update - Ok according to edit the second group just becomes
if 273 used in this example can be longer than 3 nubers if you know exact just amend that number otherwise use +