Forum Moderators: phranque
My current links looks like:
www.mydomain.com/postt859.html
and I need it to redirect to new:
www.mydomain.com/forum/viewtopic.php/t,859
The number 859 is variable.
What code I need to insert in .htaccess? I have no idea how to do it myself.
Many thanks in advance.
Have you changed to a new software package to run the site? Has the internal filepath changed as a result of that?
What internal filepath inside the server is the content really located at? Please provide details of the internal filepath (Note: a filepath is NOT a URL).
I don't understand why you want to redirect from a 'simple' URL to a 'complex' URL. Maybe you are needing a rewrite instead. Please carefully answer *all* of the above questions.
There are several thousand prior examples of the code you need here in this forum. Do not even think about code until we have gotten the exact requirements defined first.
I know that this new URL is complex, but better I cant get with this CMS (Joomla,Jfusion,PHPBB3).
It would be perfect to stay the same, only with added dir like: www.mydomain.com/forum/postt859.html but I think its not possible.
The old rule was: RewriteRule ^post(p¦t)([1-9][0-9]*).* modules.php?name=Forums&file=viewtopic&$1=$2
RewriteRule ^post([a-z])([0-9]+)\.html$ http://www.example.com/forum/viewtopic.php/$1,$2 [R=301,L]
Place all redirects ([R=301,L]) ahead of all internal rewrites ([L]) and put the two groups of rules in order from most-specific to least-specific patterns and conditions.
See the references cited in our Apache Forum Charter for more information.
Jim