PDA

View Full Version : Help with a mod_rewrite rule?


rossco_2005
10-25-2005, 08:45 PM
Can I get help writing a few mod_rewrite rules please?

We currently have mod_rewrite on our forums through a .htaccess file. Below is the current code in the .htaccess. In one of our skins (the one with mod_rewrite) the links for threads (as an example) would be tthreadid.html.


RewriteEngine on
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?f=$1 [L]
RewriteRule ^r([0-9]+)-(.*).html$ showthread.php?t=$1 [L]
RewriteRule ^w([0-9]+)-(.*).html$ showthread.php?goto=newpost&t=$1 [L]
RewriteRule ^t([0-9]+).html$ showthread.php?t=$1 [L]
RewriteRule ^w([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]


What I need to do is have the rule include a check for if ?styleid=styleid is on the end of the URL it will actually change the style. :)

Any help is appreciated. :D

rossco_2005
10-26-2005, 11:00 PM
Can anyone help? :(

rossco_2005
10-31-2005, 06:32 PM
Please?