View Full Version : rewrite rule for a redirect from public_html to main pages

10-31-2006, 04:20 AM
I have a file in a public_html for an account that is no longer around. I have the file being served from another area, but I want requests for the old location http://www.site.com/~username/filename.zip to be redirected to http://www.site.com/downloads/filename.zip

This sounded easy, but all I get in the logs is "/home/username/public_html/filename.zip does not exist."
How can I set this up in my main .htaccess for the site?

I have tried a .htaccess in the ~username/public_html:
RewriteEngine On
RewriteBase /
RewriteRule ^filename.zip /downloads/filename.zip

and in the main .htaccess for the site:
RewriteEngine On
RewriteBase /~username/
RewriteRule ^filename.zip /downloads/filename.zip

None of these change the results.