You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Norman Peelman <np...@cfl.rr.com> on 2004/09/23 04:22:45 UTC

[users@httpd] Apache2 ReWriting without redirect...

  Is it possible to do this. Some bulletin software don't like (won't accept) a redirect.

Some sofware wants hxxp://www.mysite.com/file.jpg
I ReWrite to hxxp://www.mysite.com/myscript.php?var=file

My script outputs file as if it were called directly but some bulletin software still won't accept the URL.
I cannot call file.jpg directly as it is stored in a database.

Norm

Avatar hosting at www.easyavatar.com

Re: [users@httpd] Apache2 ReWriting without redirect...

Posted by Joshua Slive <js...@gmail.com>.
[Please post in plain text.]

> Some sofware wants hxxp://www.mysite.com/file.jpg 
> I ReWrite to hxxp://www.mysite.com/myscript.php?var=file 

Try:
Alias /file.jpg /full/path/to/myscript.php?var=file

I'm not sure if this will work, due to the query string.  If it
doesn't, you'll need to use

RewriteEngine On
RewriteRule ^/file.jpg /myscript.php?var=file

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org