GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htaccess question (https://gfy.com/showthread.php?t=557699)

Peacemaker 12-28-2005 07:32 PM

.htaccess question
 
hi,
hopefuly someone can and will help me.
following situation:


user wants to download a movie from my site via a link:
http://www.mydomain.com/movies/name_abc.avi

name.avi does not exist in that folder
but i want the user to download a movie called "name_abc.avi" anyway.
in the /movies/ folder there is a .avi called "name_xyz.avi".

and the user should download the "name_xyz.avi" but the name of the download should be "name_abc.avi"

i hope you understand :)

is it possible to make this with .htaccess?

Thanks

BV 12-28-2005 07:51 PM

i think i know of a way but you can not have the file "name_xyz.avi" in the directory

involves configuring your server to set "name_abc.avi" as your 404

what is this for, i'm curious

Abbie Bueller 12-28-2005 07:55 PM

ErrorDocument 404 /movies/name_abc.avi

Put that in your .htaccess file. It will make any 404 in the same directory as .htaccess load the movie.

Peacemaker 12-28-2005 08:08 PM

Quote:

Originally Posted by Abbie Bueller
ErrorDocument 404 /movies/name_abc.avi

Put that in your .htaccess file. It will make any 404 in the same directory as .htaccess load the movie.

hmm. thats not what i want.

Abbie Bueller 12-28-2005 08:12 PM

Your instructions don't make any sense, then.

Abbie Bueller 12-28-2005 08:16 PM

I think I've deciphered your request...

1. user wants to download http://www.mydomain.com/movies/name_abc.avi

2. name.avi does not exist in that folder (abbie: name.avi? what about name_abc.avi?)

3. i want the user to download a movie called "name_abc.avi" anyway (abbie: wtf?)

4. in the /movies/ folder there is an .avi called "name_xyz.avi"

5. user should download the "name_xyz.avi" but the name of the download should be "name_abc.avi"

If you're using unix go into the folder and type this:
ln -s name_xyz.avi name_abc.avi

That makes a symbolic link (abc) to your real file (xyz). No .htaccess necessary.

woj 12-28-2005 08:38 PM

sounds like you need mod_rewrite, if you need help setting it up, icq: 33375924


All times are GMT -7. The time now is 05:02 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123