Hello, here is my .htaccess file: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^/(.+)\.(.+) img.php?img=$1.$2 Code (markup): it should rewrite: http://domain.com/l1a3l5al8a.jpg to: http://domain.com/img.php?img=l1a3l5al8a.jpg but it does not... it says 404 not found :/ can anyone guide to the right direction how to accomplish that? tried different .htaccess manuals, and seems this is the correct way, maybe my server configuration is bad? Other sites on the same server has no errors with .htaccess rewrites. Any help would be appreciated. thanks in advance, Fallen
U mean it should rewrite: http://domain.com/img.php?img=l1a3l5al8a.jpg to: http://domain.com/l1a3l5al8a.jpg right? Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^/([a-zA-Z0-9_]*)\.([a-zA-Z0-9_]*)$ img.php?img=$1.$2 Code (markup): Try that, I think you just forgot the $ at the end of the filename...
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^([^.]+)\.jpg$ img.php?img=$1 [L]