Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Help needed with mod rewrite

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  help with mod rewrite needed  
Author Message
robertdfeinman1

External


Since: Jan 03, 2004
Posts: 2



(Msg. 1) Posted: Sat Jan 03, 2004 4:31 pm
Post subject: Help needed with mod rewrite
Archived from groups: alt>apache>configuration (more info?)

There is a program called webcollage that fetches images from random
web sites and posts them into a person's screen as a collage.
I'd like to redirect this program to just a single image of my
choice.
I've done the following using mod_rewrite and it doesn't seem to work.
Nothing gets rewritten.
Any help appreciated, I'm trying to be a photographer, not system
admin in my retirement. Thanks!

--httpd.conf extract:

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^webcollage.*
RewriteRule ^(.*) robertdfeinman_com.jpg [L]

RewriteLogLevel 7
RewriteLog "/export/home/rdf/rewrite.log"

--sample from apache log
66.232.198.52 - - [03/Jan/2004:10:52:53 -0500] "GET
/panoramic_horizontal/hawaii/kauai/pages/kauai_beach_hpan.html
HTTP/1.0" 200 2980 "http://www.altavista.com/image/randomlink"
"webcollage/1.107"

--contents of rewrite.log
66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
[rid#2ab040/initial] (2) init rewrite engine with requested uri
/disco3iv/html/disco3iv.xml
66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
[rid#2ab040/initial] (3) applying pattern '^(.*)' to uri
'/disco3iv/html/disco3iv.xml'
66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
[rid#2ab040/initial] (4) RewriteCond: input='Java1.2.2'
pattern='^webcollage.*' => not-matched
66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
[rid#2ab040/initial] (1) pass through /disco3iv/html/disco3iv.xml

-- the contents of the rewrite.log file get created when I restart
the apache server, but nothing else seems to get added.
66.114.64.63 is the IP of the web server.
I have no idea what all the .xml stuff is.

Sorry, if this appears twice, but it seems my ISP ate the first posting..
--
Robert D Feinman
robertdfeinman RemoveThis @netscape.net
Landscapes, Cityscapes, Panoramas and Photoshop Tips
http://robertdfeinman.com

 >> Stay informed about: Help needed with mod rewrite 
Back to top
Login to vote
jring

External


Since: Jun 30, 2003
Posts: 154



(Msg. 2) Posted: Sun Jan 04, 2004 2:01 pm
Post subject: Re: Help needed with mod rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > --httpd.conf extract:
 >
 > RewriteEngine on
 > RewriteCond %{HTTP_USER_AGENT} ^webcollage.*
 > RewriteRule ^(.*) robertdfeinman_com.jpg [L]
 >
 > RewriteLogLevel 7
 > RewriteLog "/export/home/rdf/rewrite.log"
 >
 > --sample from apache log
 > 66.232.198.52 - - [03/Jan/2004:10:52:53 -0500] "GET
 > /panoramic_horizontal/hawaii/kauai/pages/kauai_beach_hpan.html
 > HTTP/1.0" 200 2980 "http://www.altavista.com/image/randomlink"
 > "webcollage/1.107"
 >
 > --contents of rewrite.log
 > 66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
 > [rid#2ab040/initial] (2) init rewrite engine with requested uri
 > /disco3iv/html/disco3iv.xml
 > 66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
 > [rid#2ab040/initial] (3) applying pattern '^(.*)' to uri
 > '/disco3iv/html/disco3iv.xml'
 > 66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
 > [rid#2ab040/initial] (4) RewriteCond: input='Java1.2.2'
 > pattern='^webcollage.*' => not-matched
 > 66.114.64.63 - - [03/Jan/2004:11:48:01 -0500] [66.114.64.63/sid#178040]
 > [rid#2ab040/initial] (1) pass through /disco3iv/html/disco3iv.xml
 >
 > -- the contents of the rewrite.log file get created when I restart
 > the apache server, but nothing else seems to get added.
 > 66.114.64.63 is the IP of the web server.
 > I have no idea what all the .xml stuff is.

belongs to the oracle application server on the same box. your
rewrite-rules are probably in the wrong virtual host context, they
need to go into the one with the ServerName robertdfeinman.com
directive.

also the apache version on that box is probably old enough to be quite
a security risk, btw...

joachim<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Help needed with mod rewrite 
Back to top
Login to vote
robertdfeinman1

External


Since: Jan 03, 2004
Posts: 2



(Msg. 3) Posted: Sun Jan 04, 2004 6:59 pm
Post subject: Re: Help needed with mod rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

jring.DeleteThis@web.de (Joachim Ring) wrote in message news:<3ae246c1.0401041101.699aabd9.DeleteThis@posting.google.com>...
 >
 > belongs to the oracle application server on the same box. your
 > rewrite-rules are probably in the wrong virtual host context, they
 > need to go into the one with the ServerName robertdfeinman.com
 > directive.
 >
 > also the apache version on that box is probably old enough to be quite
 > a security risk, btw...
 >
 > joachim
Thanks, I figured out that the directives needed to be in the virtual host
context a few hours after I posted the question.
I see rewrite rules in the log file, so I assume it's working. I can't think
of anyway to see what gets served since the hits are random.

It would be nice to see the results in the log file reports, but I guess
that's another topic..<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Help needed with mod rewrite 
Back to top
Login to vote
jring

External


Since: Jun 30, 2003
Posts: 154



(Msg. 4) Posted: Mon Jan 05, 2004 4:32 pm
Post subject: Re: Help needed with mod rewrite [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Thanks, I figured out that the directives needed to be in the virtual host
 > context a few hours after I posted the question.
 > I see rewrite rules in the log file, so I assume it's working. I can't think
 > of anyway to see what gets served since the hits are random.

it gives an error 400 now. you need to change the RewriteRule a bit:

RewriteRule .* /target.jpg [L]

 > It would be nice to see the results in the log file reports, but I guess
 > that's another topic..

you won't see it any other than seeing requests to random images by
the culprit app to have the length of the dummy pic. you may want to
switch your log format to combined to see the user-agent too...

joachim<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Help needed with mod rewrite 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
help with mod rewrite needed - There is a program called webcollage that fetches images from random web sites and posts them into a person's screen as a collage. I'd like to redirect this program to just a single image of my choice. I've done the following using mod_rewrite and it..

virtualhost/rewrite help needed - Hi I have a (probably simple) vh (and maybe rewrite?) problem - the rule is simple at least and should work IMO - it's strange to me why it doesn't. This is what i do: NameVirtualHost 217.160.75.67 ### ...several vh... <VirtualHost openspirit.d...

rewrite url - Hi, I have two domain names on the same IP-address (IP-host based). How can I redirect one of the domains to another documentroot ? Regards and the best wishes for 2004. Michael

Mod rewrite - Hallo, I have write in a .htaccess File something like this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]*)?/?([^/]*)?/?([^/]*)?/?([^/]*)?/?.*? index.php?show=$1&s2=$2&s3=$3&s4=...

mod-rewrite - I am attempting to use mod-rewrite to chnage my dynamically created pages into static urlls for search engine submission. I am unable to get the rewrite to work, it doesn't seem to do anything. Here is the code RewriteEngine on RewriteBase..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]