Forum Moderators: phranque
http://www.example.com/topic,14063,.html
to this:
http://www.example.com/viewtopic.php?t=14063
by using
RewriteRule ^topic,([0-9]+),.html?$ viewtopic.php?t=$1 [L] But how is it possible to rewrite
http://www.example.com/topic,17183,-fanvid.html
to
http://www.example.com/viewtopic.php?t=17183?
its like removing something what you dont know, -fanvid could be any other syntax...
[edited by: jdMorgan at 4:17 am (utc) on May 27, 2007]
RewriteRule ^topic,([0-9]+),[b]-fanvid[/b]\.html$ viewtopic.php?t=$1 [L]
Jim
One problem at a time, please...
You say that -fanvid "could be anything" -- Can you be more specific?
Is it always preceded by a comma? does it always start with "-"? Is it always there, or is it optional?
You need to fully define all possible variations in order to write a regular-expressions pattern to match.
Jim