views:

41

answers:

2

How do I set it up so that when someone goes to www.example.com/file1.mp3, they get redirected to www.example.com/file2.mp3, but the address in the browser bar stays the same?

A: 

the company you get your domain applies setting for that, there should be a option to change it. i really don't know whether you can handle it by a piece of code but the setting for the domain name is applied in that way.contact where you get your domain name or see the settings.

berkay
A: 

If using an Apache server, you can do it via .htaccess:

Alias /file1.mp3 /file2.mp3 

(Docs for the alias directive)

Also, you can dig into the whole mod_rewrite thing.

jensgram