XBitHack Off RewriteEngine On RewriteCond %{REQUEST_URI} \/([0-9a-z]{6})$ [NC] RewriteRule ^(.*) http://www.example.com/forward.php?%1 [L]