Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > .htaccess question

Reply
Thread Tools

.htaccess question

 
 
Bart van den Burg
Guest
Posts: n/a
 
      09-15-2003
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


 
Reply With Quote
 
 
 
 
Hywel Jenkins
Guest
Posts: n/a
 
      09-15-2003
In article <bk54nd$icn$(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
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
 
Reply With Quote
 
 
 
 
Michael Weber
Guest
Posts: n/a
 
      09-15-2003
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
 
Reply With Quote
 
Bart van den Burg
Guest
Posts: n/a
 
      09-15-2003
"Michael Weber" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments