Mask/Hide URL | .htaccess Redirect

Discussion about the creation of websites in general, HTML, PHP, Java.

Mask/Hide URL | .htaccess Redirect

Postby kovach on Tue Jul 18, 2006 9:44 pm

Hello! I have linux webhosting without mySQL base. I posted link to Gallery forum. Site is here!
In Mp3 section i hava a lot of files for download but they are not hosted on server yet on some localhosts with static ip address. I have just linked files and i want to hide full url of files for download. It could be done with some php redirect script but I will have to resubmit links manualy.
Could i do this faster?
What do u think about htaccess redirect?
Example:
Code: Select all
Redirect /mp3/Song_No1.mp3 http://ip/files/mymusic/Song%20No1.mp3
Redirect /mp3/Song_No2.mp3 http://ip/files/mymusic/Song%20No2.mp3

Then it would be: http://www.kovach.co.yu/mp3/Song_No1.mp3
...
Question
kovach
Contributer
Contributer
 
Posts: 49
Joined: Wed Jun 14, 2006 10:55 pm
Location: Serbia

Postby Krezarian on Wed Jul 19, 2006 7:19 am

I guess you've already dealt with it, because links are as they should be?

-Krezarian
Vae victis!
Check Team Fortress 2 and Harry Potter
Krezarian
Regular
Regular
 
Posts: 140
Joined: Mon Jun 26, 2006 11:46 am
Location: Szczecin (Stettin), P(r)oland

Postby kovach on Wed Jul 19, 2006 11:56 am

No, I'm not! I will have to rewrite all songs list (which is huge) in htaccess file.
I have list like this:
http://127.0.0.1:8000/songs/a/aaa.mp3
http://127.0.0.1:8000/songs/b/bbb.mp3
http://127.0.0.1:8000/songs/v/vvv.mp3
kovach
Contributer
Contributer
 
Posts: 49
Joined: Wed Jun 14, 2006 10:55 pm
Location: Serbia

Re: Mask/Hide URL | .htaccess Redirect

Postby callihn on Thu Jul 27, 2006 4:28 pm

.htaccess is very inefficient, use mod rewrite instead. Wink

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
callihn
Regular
Regular
 
Posts: 77
Joined: Thu Jul 27, 2006 2:35 pm
Location: Cyberspace


Return to General Webmastering

Who is online

Users browsing this forum: No registered users and 1 guest

cron