RewriteEngine On RewriteBase /~user/ RewriteRule ^(.*) code.py/$1