Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   .htaccess question (http://www.velocityreviews.com/forums/t154850-htaccess-question.html)

Bart van den Burg 09-15-2003 07:40 PM

.htaccess question
 
hi

i wish to redirect requests on a certain directory to 1 file in there, and
use the file requested as a parameter
(eg. http://www.tvreclames.nl/clips/somef...ID=4324FGD34sa ->
http://www.tvreclames.nl/clips/downl...e=somefile.mpg)

Is this possible, and if yes: How do i do this?

thx
Bart



Hywel Jenkins 09-15-2003 08:12 PM

Re: .htaccess question
 
In article <bk54nd$icn$1@reader11.wxs.nl>, bart-news@NOSPAMtvreclames.nl
says...
> hi
>
> i wish to redirect requests on a certain directory to 1 file in there, and
> use the file requested as a parameter
> (eg. http://www.tvreclames.nl/clips/somef...ID=4324FGD34sa ->
> http://www.tvreclames.nl/clips/downl...e=somefile.mpg)
>
> Is this possible, and if yes: How do i do this?


Not sure, but mod_rewrite may be what you're after.

--
Hywel

Michael Weber 09-15-2003 09:13 PM

Re: .htaccess question
 
Hi Bart,

[Mon, 15 Sep 2003 21:40:46 +0200/Bart van den Burg]
> i wish to redirect requests on a certain directory to 1 file in there, and
> use the file requested as a parameter
> (eg. http://www.tvreclames.nl/clips/somef...ID=4324FGD34sa ->
> http://www.tvreclames.nl/clips/downl...e=somefile.mpg)
>
> Is this possible, and if yes: How do i do this?


Put a .htaccess to your _root_, containig

Redirect /video http://www.whatever.com/video/videoxy.mpg

A client who is calling "www.whatever.com/video" will get the mpg
in /video.

Always use absolute paths for redirecting.

regs
michael

Bart van den Burg 09-15-2003 11:57 PM

Re: .htaccess question
 
"Michael Weber" <webster@kaffeeschluerfer.com> wrote in message
news:bk5h1t.26k.1@webbosom.online.de...
> Hi Bart,
>
> [Mon, 15 Sep 2003 21:40:46 +0200/Bart van den Burg]
> > i wish to redirect requests on a certain directory to 1 file in there,

and
> > use the file requested as a parameter
> > (eg.

http://www.tvreclames.nl/clips/somef...ID=4324FGD34sa ->
> >

http://www.tvreclames.nl/clips/downl...e=somefile.mpg)
> >
> > Is this possible, and if yes: How do i do this?

>
> Put a .htaccess to your _root_, containig
>
> Redirect /video http://www.whatever.com/video/videoxy.mpg
>
> A client who is calling "www.whatever.com/video" will get the mpg
> in /video.
>
> Always use absolute paths for redirecting.


Actually, that wasn't exactly what i was trying to achieve, but I have
finally figured it out anyway :)

say for instance I was calling:
http://www2.tvreclames.nl/somevideo....cCoASgAAA4CF-c

I had the .htaccess like this:
RewriteEngine On
RewriteRule ([^.]*\.mpg) http://www2.tvreclames.nl/download.pl?file=$1

Refering me to:
http://www2.tvreclames.nl/download.p...=somevideo.mpg
(I took it out of the clips dir, since it's in fact only 1 file)

This still didn't give me the sessionID, which I just fetched with perl
using $ENV{REQUEST_URI}

Quite a nice learning process, since before trying this, I knew nothing of
..htaccess :)

Bart




All times are GMT. The time now is 12:19 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.