Mod Rewrite

Soldato
Joined
18 Apr 2004
Posts
2,613
Location
London
This is what id do, very similar to yours, you can compound A-Za-z with A-z, I would also allow _ , and finaly, [NC] allows a mIx oF UPPER and lower cAsE letters. apart from that it should work, obviously you need to have the RewriteEngine On statment and the Options +... Helps for some webservers, like mine where it won't work without that.

Code:
Options +FollowSymlinks -indexes
RewriteEngine On

RewriteRule ^images/teambanner/([A-z0-9-_]+)\.jpg/?$ /images/teambanner.php?id=$1 [NC]
 
Associate
OP
Joined
30 Dec 2005
Posts
415
Argh! That gave me a 500 Internal Server Error, and the following in the error log:
/home/route/public_html/.htaccess: RewriteRule: cannot compile regular expression '^images/teambanner/([A-z0-9-_]+)\\.jpg/?$'\n
 
Back
Top Bottom