Mod_Rewrite guru help needed

Hi i need a mod_rewrite/regular expressions guru's help Mod_Rewrite guru help needed

I'm moving my vB forums to a new server from

RH 6.2
2.2.19 SMP kernel
Apache 1.3.26
PHP 4.1.2
MySQL 3.23.45
Cpanel/whm with SuExec disabled (WHM 4.8.0 /Cpanel 4.8.0-80)

to

RH 7.3
2.4.18 SMP kernel
Apache 1.3.26
PHP 4.1.2
MySQL 3.23.51
Cpanel/whm with SuExec enabled (WHM 4.8.0 /Cpanel 4.8.0-80)

and in my forum's <VirtualHost></VirtualHost> entry at the bottom i have for shorter vB urls
Code:
RewriteEngine on
RewriteRule ^/f([0-9]+)/?$ /forumdisplay.php?forumid=$1 [L]
RewriteRule ^/f([0-9]+)/s?$ /forumdisplay.php?forumid=$1 [L]
RewriteRule ^/t([0-9]+)\.html$ /showthread.php?threadid=$1 [L]
RewriteRule ^/t([0-9]+)/s([^/]+?)\.html$ /showthread.php?threadid=$1&s=$2 [L]
RewriteRule ^/s([^/\?]0-9)+?/$ /index.php?s=$1 [L]
they would work on my original server.

but on my RH 7.3 server when i restart apache, the last 2 lines cause errors and apache doesn't restart.
Code:
RewriteEngine on
RewriteRule ^/f([0-9]+)/?$ /forumdisplay.php?forumid=$1 [L]
RewriteRule ^/f([0-9]+)/s?$ /forumdisplay.php?forumid=$1 [L]
RewriteRule ^/t([0-9]+)\.html$ /showthread.php?threadid=$1 [L]
above first 3 lines are okay

last 2 lines have problems
Code:
RewriteRule ^/t([0-9]+)/s([^/]+?)\.html$ /showthread.php?
threadid=$1&s=$2 [L]
i get this error
Syntax error on line 1691 of /usr/local/apache/conf/httpd.conf:
RewriteRule: cannot compile regular expression '^/t([0-9]+)/s([^/]+?)
\.html$'
Code:
RewriteRule ^/s([^/\?]0-9)+?/$ /index.php?s=$1 [L]
I get this error
Syntax error on line 1692 of /usr/local/apache/conf/httpd.conf:
RewriteRule: cannot compile regular expression '^/s([^/\?]0-9)+?/$'
currently my vB forum's urls on my RH 6.2 server are in the format

http://forumdomain.com/f1/s
http://forumdomain.com/t42538/s.html

any mod_rewrite gurus who can tell me how fix this for my new server ?

any help is very much appreciated Mod_Rewrite guru help needed

 

 

 

 

Top